$.ajax({
type : "POST",
url :"/blogroll/relink_check",
data : "domain="+domain+"&lurl="+lurl,
dataType : "json",
success: function(msg){
if (msg != null) {
$("#relink_info"+num).html(msg.relink_info);
}else {
$("#relink_info"+num).html("域名状态繁忙,请稍后检测。"); //即使我的后台程序逻辑总会返回结果,但msg仍有可能返回为null的情况。
}
},
error:function(){
$("#relink_info"+num).html('检测错误'); //测试中后台msg返回null时,此函数并不起作用。
}
});
JQuery中使用Ajax返回数据失败的处理
最新推荐文章于 2021-08-05 16:36:57 发布