【发布时间】:2014-09-25 14:42:59
【问题描述】:
在 IE 11 中,我使用 xml 作为我的数据以发送和返回数据作为 xml,当我第一次加载我的页面时,当我根据任何事件调用 ajax 调用后,它显示错误为:
{readyState: 4, responseText: "", status: 500, statusText: "Internal Se..."}
与 Mozilla Firefox 相同的代码,它可以正常工作并返回我想要的正确结果。
为此我的代码是:
$.ajax({
async: true,
cache: false,
url : url,
type : 'POST',
precessData : true,
contentType : "application/xml",
data : data,
dataType : "text",
error: function (err) {
console.log(err);
}
}).done(function(res){
console.log(res);
});
【问题讨论】:
-
IE开发者工具有没有出现错误,尤其是安全错误?
-
没有提到我得到的错误或消息。
-
如果我是你,我会
console.log(data)看看第二次通话后数据是否正确 -
是的,我放了这一行,它向我显示了我想要的预期结果,因为这些数据作为输入 xml。
-
服务器端是否稳定并检查唯一连接(阻止来自同一 IP 的第二个连接等)
标签: jquery ajax internet-explorer-11