如何使用XDomainRequest正确重写Ajax请求以使其在IE 8 +中工作?
$.ajax({ type: "GET", url: url, success: function(xml) { $('.post-msg').append(processXml(xml, config)); }, error: function(jqXhr, textStatus, errorThrown) { var errorMsg = "Request on url: " + url + " failed: " + textStatus + " error:" + errorThrown; alert(errorMsg); } });
将此插件用于IE8-9 Xdomain支持。
https://github.com/MoonScript/jQuery-ajaxTransport- XDomainRequest