• <bdo id='zgWIs'></bdo><ul id='zgWIs'></ul>

    <tfoot id='zgWIs'></tfoot>

    <small id='zgWIs'></small><noframes id='zgWIs'>

      <legend id='zgWIs'><style id='zgWIs'><dir id='zgWIs'><q id='zgWIs'></q></dir></style></legend>
    1. <i id='zgWIs'><tr id='zgWIs'><dt id='zgWIs'><q id='zgWIs'><span id='zgWIs'><b id='zgWIs'><form id='zgWIs'><ins id='zgWIs'></ins><ul id='zgWIs'></ul><sub id='zgWIs'></sub></form><legend id='zgWIs'></legend><bdo id='zgWIs'><pre id='zgWIs'><center id='zgWIs'></center></pre></bdo></b><th id='zgWIs'></th></span></q></dt></tr></i><div id='zgWIs'><tfoot id='zgWIs'></tfoot><dl id='zgWIs'><fieldset id='zgWIs'></fieldset></dl></div>
    2. NETWORK_ERROR:XMLHttpRequest 异常 101

      NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 异常 101)

      <small id='Tb9Cx'></small><noframes id='Tb9Cx'>

      • <tfoot id='Tb9Cx'></tfoot>
        <legend id='Tb9Cx'><style id='Tb9Cx'><dir id='Tb9Cx'><q id='Tb9Cx'></q></dir></style></legend>
          <tbody id='Tb9Cx'></tbody>

          1. <i id='Tb9Cx'><tr id='Tb9Cx'><dt id='Tb9Cx'><q id='Tb9Cx'><span id='Tb9Cx'><b id='Tb9Cx'><form id='Tb9Cx'><ins id='Tb9Cx'></ins><ul id='Tb9Cx'></ul><sub id='Tb9Cx'></sub></form><legend id='Tb9Cx'></legend><bdo id='Tb9Cx'><pre id='Tb9Cx'><center id='Tb9Cx'></center></pre></bdo></b><th id='Tb9Cx'></th></span></q></dt></tr></i><div id='Tb9Cx'><tfoot id='Tb9Cx'></tfoot><dl id='Tb9Cx'><fieldset id='Tb9Cx'></fieldset></dl></div>

              • <bdo id='Tb9Cx'></bdo><ul id='Tb9Cx'></ul>
              • 本文介绍了NETWORK_ERROR:XMLHttpRequest 异常 101的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我收到此错误

                NETWORK_ERROR:XMLHttpRequest 异常 101

                NETWORK_ERROR: XMLHttpRequest Exception 101

                当试图从一个站点获取 XML 内容时.

                when trying to get XML content from one site.

                这是我的代码:

                    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);
                

                有人有解决办法吗?

                推荐答案

                如果您提供的url位于您的服务器外部,并且服务器不允许您发送请求,则您有权限问题.您不能使用 XMLHttpRequest 从另一台服务器访问数据,除非服务器明确允许您这样做.

                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.

                更新: 意识到这现在可以在 Google 上看到作为答案,我试图找到有关此错误的一些文档.这太难了.

                Update: Realizing this is now visible as an answer on Google, I tried to find some documentation on this error. That was surprisingly hard.

                这篇文章,有一些背景信息和解决步骤.具体来说,它在这里提到了这个错误:

                This article though, has some background info and steps to resolve. Specifically, it mentions this error here:

                只要将服务器配置为允许来自您的 Web 应用程序的请求,XMLHttpRequest 就可以工作.否则会抛出 INVALID_ACCESS_ERR 异常

                As long as the server is configured to allow requests from your web application's origin, XMLHttpRequest will work. Otherwise, an INVALID_ACCESS_ERR exception is thrown

                INVALID_ACCESS_ERR 的解释似乎是我们在这里看到的.

                An interpretation of INVALID_ACCESS_ERR seems to be what we're looking at here.

                要解决这个问题,必须将接收请求的服务器配置为允许来源.这在 Mozilla 的更多详细信息中有描述.

                To solve this, the server that receives the request, must be configured to allow the origin. This is described in more details at Mozilla.

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

                【网站声明】本站部分内容来源于互联网,旨在帮助大家更快的解决问题,如果有图片或者内容侵犯了您的权益,请联系我们删除处理,感谢您的支持!

                相关文档推荐

                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不适用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 无法加载,请求的资源上不存在“Access-Control-Allow-Origin标头) - IT屋-程序员软件开发技术分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 请求是否有可能不遵循重定向 (301 302))
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分内容)
                Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                XmlHttpRequest onprogress interval(XmlHttpRequest onprogress 间隔)

                    <bdo id='7cAUK'></bdo><ul id='7cAUK'></ul>

                    • <i id='7cAUK'><tr id='7cAUK'><dt id='7cAUK'><q id='7cAUK'><span id='7cAUK'><b id='7cAUK'><form id='7cAUK'><ins id='7cAUK'></ins><ul id='7cAUK'></ul><sub id='7cAUK'></sub></form><legend id='7cAUK'></legend><bdo id='7cAUK'><pre id='7cAUK'><center id='7cAUK'></center></pre></bdo></b><th id='7cAUK'></th></span></q></dt></tr></i><div id='7cAUK'><tfoot id='7cAUK'></tfoot><dl id='7cAUK'><fieldset id='7cAUK'></fieldset></dl></div>
                            <tbody id='7cAUK'></tbody>

                          <small id='7cAUK'></small><noframes id='7cAUK'>

                          <legend id='7cAUK'><style id='7cAUK'><dir id='7cAUK'><q id='7cAUK'></q></dir></style></legend>

                        • <tfoot id='7cAUK'></tfoot>