function remitFail(code){
$( "#dialog").dialog( "destroy" );
$( "#dialog-confirm-info").html("<textarea rows='4' cols='40'id='reason'></textarea>");
$( "#dialog-confirm" ).dialog({
title:'失败原因',
resizable: false,
height:200,
modal: true,

buttons: { "确定": function() {
   $( this ).dialog( "close" );
   if(null != code && "" != code){
var url = "remitFail.action?code="+code;
alert($("#dialog-confirm-info").children("#reason").text()) //window.location.href = url;
}else{
alert("操作失败,编号不能为空.");
}
   
 },
   "取消": function() { $( this ).dialog( "close" );}}
});

}在textarea中输入内容后,红色字体部分获取不到值。大家帮忙看看什么原因。谢谢了。