答案 0 :(得分:1)
如果你使用XHR使用处理程序。
var xhr = new XMLHttpRequest();
xhr.open('GET', "http://www.some.com", true);
xhr.onreadystatechange = handler;
xhr.send();
function handler(){
if (this.readyState == this.DONE)
{
if (this.status == 200 && this.responseXML != null )
{
var response = xhr.responseXML;
}
else{
console.log("status:" + xhr.status);
alert("xhr Errors Occured");
}
}
else
console.log("currently the application is at " + this.readyState);
}
并将断点放在Firebug内部处理程序中。