Javascript .error()jquery函数中的详细错误消息
我正在使用.error()作为.post()的回调。比如:Javascript .error()jquery函数中的详细错误消息,javascript,jquery,Javascript,Jquery,我正在使用.error()作为.post()的回调。比如: 如果发生错误,我想查看详细的错误消息。我怎么看出来?最好使用fail()而不是弃用的error()。最好使用fail()而不是弃用的error()。 $.post("url", function(data){}) .error(function(event, jqXHR, ajaxSettings, thrownError){ console.log(event, jqXHR, ajaxSettings, thrownEr
如果发生错误,我想查看详细的错误消息。我怎么看出来?最好使用
fail()
而不是弃用的error()
。最好使用fail()
而不是弃用的error()
。
$.post("url", function(data){})
.error(function(event, jqXHR, ajaxSettings, thrownError){
console.log(event, jqXHR, ajaxSettings, thrownError);
});
$.post("url", function(data){})
.error(function(event, jqXHR, ajaxSettings, thrownError){
console.log(event, jqXHR, ajaxSettings, thrownError);
});