在火狐和IE11中,JQuery从AJAX调用中获得的错误信息有很大的差异:
ajaxData = {id: 1234, quantity: 3};
$.ajax({
type: 'POST',
url: BASE_URL + 'ajax/this-page-does-not-exist.php',
dataType: 'json',
data: ajaxData,
error: function(xhr, textStatus, errorThrown){
// in Firefox:
// - xhr.responseText has the "Not found" HTML message returned by the server
// - xhr.status is 404
// - textStatus is 'error'
// - errorThrown is 'Not Found'
// in IE11:
// - xhr.responseText is empty
// - xhr.status is 0
// - textStatus is 'error'
// - errorThrown is empty
},
success: function(data, textStatus, xhr){
// ...
}
});这里出了什么问题?
发布于 2014-05-28 12:05:45
这可能和我在这里问的是一样的:
微软表示,他们将调查这个问题。
https://stackoverflow.com/questions/23086185
复制相似问题