近日,自己写了一个用户权限列表配置管理。在用户角色列表发生变化时,自己绘制的权限树的checkbox checked属性则发生变化。
结果用$.post,IE是正常使用,chrome死活不行。就是不刷新。
分析发现dealText在chrome返回值时没有得到我要的结果。难道是异步同步的问题?
所以改用$.ajax直接调用。成功了。我把async: true,
熊~~,还是ok的。为什么post不可以,ajax就可以呢。还请高手帮忙指点。
---------成功代码
function selectChange()
{$.ajax({
url: 'on***********Change.action',
type: 'get',
async: true,
data: {
'*******Vo.******Id': $("#*****ID").val()
},
dataType: 'html',
success: function(dealText){
$("#reloadDiv").html(dealText);
checkedShow();
}
});
------------chrome,ff中 部成功代码
// $.post( "on*******Change.action",
// {
// '******Vo.roleId': $("#*****ID").val()
// },
// function(dealText)
// {
// $("#reloadDiv").html(dealText);
// alert($("#reloadDiv").html());
// checkedShow();
// });
}