IE11下这个方法正常
$.ajax({
type: "POST",
url: url,
data: JSONData,
dataType: "json",
success: function (result) {
},
error: function (data, status, e) {
layer.alert("错误!" + e);
}
});
IE8下需要添加content-type和async参数才能正常工作
$.ajax({
type: "POST",
url: url,
data: JSONData,
dataType: "json",
contentType: "application/x-www-form-urlencoded;charset=utf-8",
async:false,
success: function (result) {
},
error: function (data, status, e) {
layer.alert("错误!" + e);
}
});
转载请注明原文地址: https://ju.6miu.com/read-1311901.html