问题
I am trying to make a http GET request in IE8. This works fine in all other browsers and in IE8 when using jQuery but not the native method. I also tried another endpoint I have but no luck. All it returns is 'Unspecified error.' in the console on the xdr.send() line.
var xdr = new XDomainRequest();
xdr.open("get", 'http://localhost/jump/test');
xdr.onload = function () {
alert("Loading");
alert(xdr.responseText);
};
xdr.onsuccess = function() {
alert("Success!");
alert(xdr.responseText);
};
xdr.onerror = function() {
alert("Error!");
alert(xdr.responseText);
};
xdr.onprogress = function() {
alert("Progress");
alert(xdr.responseText);
};
xdr.timeout = 10000;
xdr.send();
来源:https://stackoverflow.com/questions/43855467/xdomainrequest-unspecified-error-in-ie8