我的ajax调用有问题。我测试的每个浏览器都执行我的ajax调用(Chrome,Firefox),但IE不会,我也不知道为什么。你能救我吗?
function getAjaxStatus(url, callback) {
var id = $.urlParam(url, 'serverid');
console.log(url);
if (!serverControl[url] || typeof serverControl[url] === 'undefined') {
serverControl[url] = 1;
$.ajax({
//cache: false,
type: "GET",
url: url,
contentType: "application/json; charset=utf-8",
success: function (model) {
if (typeof callback === 'function') {
callback(model, id);
}
},
error: function (errorMsg) {
if (typeof callback === 'function') {
callback(errorMsg, id);
}
}
})
.always(function () {
serverControl[url] = 0;
});
}
}