小编sen*_*con的帖子

使用Script7002 IE https CORS XHR请求失败:XMLHttpRequest:网络错误0x2eff

在所有其他非IE浏览器中,以下代码段效果很好:

<!DOCTYPE html>
<html>
<script type="text/javascript">
var xhr = new XMLHttpRequest();
var url = "https://otherdomain.com";
var method = "GET";
xhr.open(method, url, true);

xhr.onload = function() {
 var responseText = xhr.responseText;
 document.write(responseText);
};

xhr.send()

</script>
</html>
Run Code Online (Sandbox Code Playgroud)

在两个不同的IE11浏览器中(运行在不同的OS版本上),我得到两个不同的错误:

  1. IE11 Win7:Script7002:XMLHttpRequest:网络错误0x80070005,访问被拒绝.
  2. IE11 Win8:Script7002:XMLHttpRequest:网络错误0x2eff由于错误00002eff无法完成操作

谷歌搜索上述错误代码并没有提供任何有用的信息.我已经尝试设置Content-Type,为onprogress和onload添加虚函数,但无济于事.

ajax https internet-explorer xmlhttprequest cors

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

ajax ×1

cors ×1

https ×1

internet-explorer ×1

xmlhttprequest ×1