Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/421.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Internet Explorer中的XMLHttp请求_Javascript_Internet Explorer_Xmlhttprequest - Fatal编程技术网

Javascript Internet Explorer中的XMLHttp请求

Javascript Internet Explorer中的XMLHttp请求,javascript,internet-explorer,xmlhttprequest,Javascript,Internet Explorer,Xmlhttprequest,我正在使用下面的代码使用IE11发送HTTP请求 httpRequest.onreadystatechange = function() {}; httpRequest.open('GET', myURL); httpRequest.send(); 这将从我的网站向本地主机发送请求 它在Firefox和Chrome中运行良好,速度更快。但在IE11中,它并不一致,有时有效,有时无效 我也试过密码 var req = document.createElement("img"); req.s

我正在使用下面的代码使用IE11发送HTTP请求

 httpRequest.onreadystatechange = function() {};
 httpRequest.open('GET', myURL);
 httpRequest.send();
这将从我的网站向本地主机发送请求

它在Firefox和Chrome中运行良好,速度更快。但在IE11中,它并不一致,有时有效,有时无效

我也试过密码

var req = document.createElement("img");
req.src = myURL;
但是没有帮助。有什么我需要添加或更改的吗

请引导我


提前感谢

显示完整的代码,您可以在其中创建httpRequest.Hi VLAS,在函数中我只使用var httpRequest=new XMLHttpRequest();httpRequest.onreadystatechange=函数(){};httpRequest.open('GET',myURL);httpRequest.send();