我想一个让跨域AJAX调用。它的工作原理在Chrome和Firefox,但不是在IE11。 IE11似乎下降AJAX调用。 IE11开发者工具网络发现,请求甚至没有到url做。下面是代码,我有段。
$(function() {
var url = "https://example.com?abc=xyz";
$.ajax({
type : "GET",
contentType : "text/plain",
url : url + "&callback=?",
dataType : 'jsonp',
xhrFields : {
withCredentials : false
},
headers : {},
success : function() {
console.log("success");
},
error : function() {
console.log("error");
},
complete : function() {
console.log("complete");
}
});
});
$.ajax({
type : "GET",
cache: false,
或Ajax调用之前
$.ajaxSetup({ cache: false });
$.ajax({
type : "GET",