0
를 포기하지 않을이 오류 정보 JQuery와 파이어 폭스와 IE11에서 AJAX 호출에서 얻는 것 사이 상당한 차이가있다 :JQuery와 : IE11 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){
// ...
}
});
잘못 여기서 뭐하는거야?
jQuery의 어떤 버전입니까? –
jQuery v1.10.2 사용 – Jodes
오류 대신 실패를 사용하면 어떻게됩니까? jQuery 1.8에서는 오류, 성공 및 완료가 사용되지 않습니다. –