fiddler中的ajax调用正在发生并返回带有json响应的200 OK但是onload函数错误输出并且显示的错误是“对象不支持此属性或方法”xdr.onload
if($.browser.msie) {
if(window.XDomainRequest == undefined) {
var xdr = new ActiveXObject('Microsoft.XMLHTTP');
} else {
var xdr = new XDomainRequest();
}
xdr.open("post", ajaxStatusUrl+"?buster="+ new Date().getTime());
setTimeout(function() {
xdr.send();
}, 1000);
xdr.onload = function() {
var JSON = $.parseJSON(xdr.responseText);
if(JSON == null || typeof (JSON) == 'undefined') {
JSON = $.parseJSON(data.firstChild,textContent);
}
processData(JSON);
};
xdr.onprogress = function() {};
xdr.ontimeout = function() {};
xdr.onerror = function() {
alert('error');
};
} else {
$.ajax({
type: "POST",
url: ajaxStatusUrl+"?buster="+ new Date().getTime(),
processData: true,
dataType: "json",
success: function(data) {
processData(data);
}
});
}
});