前端根据jquery ajax的error状态值返回404

$.ajax({
url: ‘xxxxxxxx’,
success: function (data) {
for (var i in data) {
var advancedObj = {
DictId: ‘’,
DictData: ‘’
}
advancedObj.DictId = data[i].ManageDeptid;
advancedObj.DictData = data[i].ManageDeptName;
advancedObjOpt[12].opt.push(advancedObj)
}
},
error: function (XMLhttpServlet) {
console.log(“readystate->” + XMLhttpServlet.readyState);
console.log(“status->” + XMLhttpServlet.status);
console.log(“网络故障!”);
}
});

你可能感兴趣的:(前端根据jquery ajax的error状态值返回404)