我试图访问一个404事件,我可以看到回来作为404与firebug,但错误功能没有踢,用我的下面的代码我总是得到错误:成功?
即.
$.ajax({
type: 'get',
url: 'url: 'https://admin.instantservice.com/resources/smartbutton/5702/10945/available.gif?' + Math.floor(Math.random()*10001),
success: function(data, textStatus, XMLHttpRequest){
console.log('Error: ' + textStatus);
},
error:function (xhr, ajaxOptions, thrownError){
alert(xhr.status);
alert(xhr.statusText);
alert(xhr.responseText);
}
});
Run Code Online (Sandbox Code Playgroud)
我再次知道1000%,我在firebug中获得404 Not Found,它永远不会触发错误.
我错过了什么吗?
jquery ×1