我的网页上有一个按钮,它调用如下的ajax方法
$.ajax({
cache: false,
type:'POST',
data: 'type='+userType +'&user='+user ,
url:' ".\yii\helpers\Url::to([$program.'/'.$url.'/setcustomer/'])." ',
success: function(data) {
console.log('Hii');
$('#phoneErr').html(data);
}
});
Run Code Online (Sandbox Code Playgroud)
这适用于除IE11以外的所有浏览器,当我单击按钮时出现以下错误:
SCRIPT7002: XMLHttpRequest: Network Error 0x800c0008, The download of the specified resource has failed.
Run Code Online (Sandbox Code Playgroud)
有人遇到过这个问题吗,对此有什么解决方案?
setcustomer操作中我的PHP代码中有重定向。这个问题可以和它有关吗?
我的ajax响应主体说,键值响应HTTP / 1.1 302找到并没有真正重定向到所需页面是与IE ajax相关的问题,无法成功处理ajax响应中的302重定向。