NETWORK_ERROR:XMLHtt prequest异常101 [英] NETWORK_ERROR: XMLHttpRequest Exception 101

查看:565
本文介绍了NETWORK_ERROR:XMLHtt prequest异常101的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误

NETWORK_ERROR:XMLHtt prequest异常101

NETWORK_ERROR: XMLHttpRequest Exception 101

试图从一个站点获取XML内容的时候。这是我的code

when trying to get XML content from one site. Here is my code

var xmlhttp; 
if(window.XMLHttpRequest)
        { 
            xmlhttp = new XMLHttpRequest();
        }
         if (xmlhttp==null)
        {
            alert ("Your browser does not support XMLHTTP!");
            return;
        }         

xmlhttp.onReadyStateChange=function() 
        {
                if(xmlhttp.readyState==4)
                {
                var value =xmlhttp.responseXML;
                alert(value);
                }
         } 
        xmlhttp.open("GET",url,false);
        xmlhttp.send();
        //alert(xmlhttp.responseXML);      
     }
xmlhttp.open("GET",url,false);
xmlhttp.send(null);

没有任何一个有办法解决吗?

Does any one have a solution?

推荐答案

如果在网​​址您提供的位于外部到你的服务器,并且服务器已经不允许你发送请求,您有权限的问题。你不能从其他服务器访问数据的 XMLHtt prequest ,如果没有服务器明确允许你这样做。

If the url you provide is located externally to your server, and the server has not allowed you to send requests, you have permission problems. You cannot access data from another server with a XMLHttpRequest, without the server explicitly allowing you to do so.

<一个href="http://stackoverflow.com/questions/355185/permission-denied-when-using-xmlhtt$p$pquest-open-cross-browser-access">See此相关的问题

这篇关于NETWORK_ERROR:XMLHtt prequest异常101的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆