转IE9以下$.ajax跨域返回“No transport”
发布时间:2020-12-16 03:02:21 所属栏目:百科 来源:网络整理
导读:$.ajax({ type: "POST",async: false,contentType: "application/x-www-form-urlencoded;charset=UTF-8",xhrFields: { withCredentials: true },url:url,data:data,success:function (response) { arr = response.Data.ListData; },error:function (XMLHttpR
$.ajax({ type: "POST",async: false,contentType: "application/x-www-form-urlencoded;charset=UTF-8",xhrFields: { withCredentials: true },url:url,data:data,success:function (response) { arr = response.Data.ListData; },error:function (XMLHttpRequest,textStatus,errorThrown) { alert(XMLHttpRequest.readyState); alert(textStatus); } });
代码如上,本以为是代码出问题,结果后面查阅资料发现,IE8还不支持
|