jquery ajax错误方法处理
error: function(jqXHR, exception) {
if (jqXHR.status === 0) {
alert('Not connect.\n Verify Network.');
} else if (jqXHR.status == 404) {
alert('Requested page not found. [404]');
} else if (jqXHR.status == 500) {
alert('Internal Server Error [500].');
} else if (exception === 'parsererror') {
alert('Requested JSON parse failed.');
} else if (exception === 'timeout') {
alert('Time out error.');
} else if (exception === 'abort') {
alert('Ajax request aborted.');
} else {
alert('Uncaught Error.\n' + jqXHR.responseText);
}
} 相关推荐
夜雨倚琴 2019-11-29
88251048 2015-04-16
人亦有言进退维谷 2012-08-30
woxmh 2011-09-05
longshengguoji 2014-06-04
XIAyuzheng 2013-04-17
lxyd000 2011-05-27
yanghan 2015-08-31
岁月如歌 2016-12-15
Eumenidess 2014-06-13
fengxu 2019-04-19
Movenow 2012-12-13
iamlazyphper 2016-10-09
zzycgfans的blog 2019-04-10
leehbing 2014-04-21
yserver 2013-04-17