带有JSON的Ajax在IE 11中不起作用
以下ajax代码在Firefox、chrome、safari和IE9中运行良好。但在IE11中,它不起作用带有JSON的Ajax在IE 11中不起作用,ajax,json,internet-explorer-11,Ajax,Json,Internet Explorer 11,以下ajax代码在Firefox、chrome、safari和IE9中运行良好。但在IE11中,它不起作用 $.ajax({ type: req_type, url: req_url, crossDomain: true, cache: false, data: req_data, contentType: "application/json; charset=utf-8", dataType: "json", processda
$.ajax({
type: req_type,
url: req_url,
crossDomain: true,
cache: false,
data: req_data,
contentType: "application/json; charset=utf-8",
dataType: "json",
processdata: true,
success: function (data) {
if (typeof callback === "undefined")
alert("Callback method not found");
else
callback(data);
},
error: function (e)
{
console.log(e);
alert("Error");
}
req_类型是POST,当我警告req_数据时,它工作正常,但是Ajax页面中没有接收到JSON对象。请帮助我
问候,
Rekha我通过删除以下代码行找到了解决方案
crossDomain: true,
cache: false,
processdata: true,
现在它运行良好
问候,Rekha我调试了代码,发现问题出在$json=file\u get\u contents('php://input'); 这在IE 11中不起作用。有人知道这方面的解决方法吗。