jquery $.ajax方法
$.ajax({
timeout: 3000,
cache:false,
global:false,
type: "POST",
url: WEB_URL+"/logic/private/",
data: {
entry:"privatelist",
operation:"get",
userid:$.cookie('userid'),
token:$.cookie('token')
},
dataType: "JSON",
beforeSend: function(XMLHttpRequest){
$.blockUI({ message: $('#loadmsg') });
},
success: function(data){
if(data.info==1)
{
refreshPersonInfo(data);
}else{
showErr(data.tips);
}
},
complete: function(XMLHttpRequest){
$.unblockUI();
},
error: function(){alert("本次数据请求错误,请刷新页面后重试!");}
});
posted on 2014-09-08 09:45 atomgame的记事本 阅读(140) 评论(0) 编辑 收藏 举报