AJAX cross-domain request IE 8+

2019-01-20 05:22发布

How to correct rewrite the Ajax request to make it work in IE 8 +, using XDomainRequest?

$.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);
    }
});

1条回答
倾城 Initia
2楼-- · 2019-01-20 06:08
登录 后发表回答