0
我无法找到有关jQuery ajax错误的文档。我想创建一个能够获取被调用的Web服务的名称以报告错误的函数。jQuery Ajax和错误处理
在错误函数中有一种方法来获取函数的名称?
error: function() {
//not sure what is available here
}
我很感激任何有关错误功能中可用内容的文档。
我无法找到有关jQuery ajax错误的文档。我想创建一个能够获取被调用的Web服务的名称以报告错误的函数。jQuery Ajax和错误处理
在错误函数中有一种方法来获取函数的名称?
error: function() {
//not sure what is available here
}
我很感激任何有关错误功能中可用内容的文档。
看一看这个问题:jQuery Ajax error handling, show custom exception messages
误差函数是:
error:function (xhr, ajaxOptions, thrownError){
console.dir(xhr);
console.dir(thrownError);
}
哪里XHR是XMLHttpRequest的。你可以使用FireBug的console.dir来获取它的属性。