久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <bdo id='lPqUZ'></bdo><ul id='lPqUZ'></ul>
      <tfoot id='lPqUZ'></tfoot>
      <legend id='lPqUZ'><style id='lPqUZ'><dir id='lPqUZ'><q id='lPqUZ'></q></dir></style></legend>
    1. <small id='lPqUZ'></small><noframes id='lPqUZ'>

        <i id='lPqUZ'><tr id='lPqUZ'><dt id='lPqUZ'><q id='lPqUZ'><span id='lPqUZ'><b id='lPqUZ'><form id='lPqUZ'><ins id='lPqUZ'></ins><ul id='lPqUZ'></ul><sub id='lPqUZ'></sub></form><legend id='lPqUZ'></legend><bdo id='lPqUZ'><pre id='lPqUZ'><center id='lPqUZ'></center></pre></bdo></b><th id='lPqUZ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lPqUZ'><tfoot id='lPqUZ'></tfoot><dl id='lPqUZ'><fieldset id='lPqUZ'></fieldset></dl></div>

      1. XMLHttpRequest 狀態 0(responseText 為空)

        XMLHttpRequest status 0 (responseText is empty)(XMLHttpRequest 狀態 0(responseText 為空))

                  <tbody id='01yYY'></tbody>

                <small id='01yYY'></small><noframes id='01yYY'>

                • <bdo id='01yYY'></bdo><ul id='01yYY'></ul>

                  <i id='01yYY'><tr id='01yYY'><dt id='01yYY'><q id='01yYY'><span id='01yYY'><b id='01yYY'><form id='01yYY'><ins id='01yYY'></ins><ul id='01yYY'></ul><sub id='01yYY'></sub></form><legend id='01yYY'></legend><bdo id='01yYY'><pre id='01yYY'><center id='01yYY'></center></pre></bdo></b><th id='01yYY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='01yYY'><tfoot id='01yYY'></tfoot><dl id='01yYY'><fieldset id='01yYY'></fieldset></dl></div>
                  <legend id='01yYY'><style id='01yYY'><dir id='01yYY'><q id='01yYY'></q></dir></style></legend>
                  <tfoot id='01yYY'></tfoot>
                • 本文介紹了XMLHttpRequest 狀態 0(responseText 為空)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  無法通過 XMLHttpRequest 獲取數據(狀態 0 且 responseText 為空):

                  <上一頁>xmlhttp=新的 XMLHttpRequest();xmlhttp.open("GET","http://www.w3schools.com/XML/cd_catalog.xml", true);xmlhttp.onreadystatechange=函數(){如果(xmlhttp.readyState==4)警報(狀態" + xmlhttp.status);}xmlhttp.send();

                  它會提醒狀態 0".

                  與localhost請求相同的情況(cd_catalog.xml保存為本地文件)

                  <上一頁>xmlhttp.open("GET","http://localhost/cd_catalog.xml", true);

                  但是使用 localhost IP 請求

                  <上一頁>xmlhttp.open("GET","http://127.0.0.1/cd_catalog.xml", true);

                  并與本地文件請求

                  <上一頁>xmlhttp.open("GET","cd_catalog.xml", true);

                  一切正常(狀態 200)

                  在線請求出現問題 (status=0) 的原因是什么?

                  PS:Live HTTP Headers 顯示在所有 4 種情況下一切正常:

                  <上一頁>HTTP/1.1 200 正常內容長度:4742

                  PS2:VMWare 上的 Apache 本地 Web 服務器(主機操作系統 Win7、來賓操作系統 Ubuntu、網絡適配器 – NAT).瀏覽器 – 火狐.

                  解決方案

                  當你的包含腳本的 html 文件通過文件方案在瀏覽器中打開時,狀態為 0.確保將文件放在您的服務器(apache 或 tomcat 等)中,然后在瀏覽器中通過 http 協議打開它.(即 http://localhost/myfile.html)這就是解決方案.

                  Cannot get data with XMLHttpRequest (status 0 and responseText is empty):

                  xmlhttp=new XMLHttpRequest();
                  xmlhttp.open("GET","http://www.w3schools.com/XML/cd_catalog.xml", true);
                  xmlhttp.onreadystatechange=function() 
                  {
                    if(xmlhttp.readyState==4)
                      alert("status " + xmlhttp.status);
                  }
                  xmlhttp.send();
                  

                  It alerts "status 0".

                  The same situation with the localhost request (cd_catalog.xml is saved as a local file)

                  xmlhttp.open("GET","http://localhost/cd_catalog.xml", true);
                  

                  But with the localhost IP request

                  xmlhttp.open("GET","http://127.0.0.1/cd_catalog.xml", true);
                  

                  and with the local file request

                  xmlhttp.open("GET","cd_catalog.xml", true);
                  

                  everything is OK (status 200)

                  What can cause the problem (status=0) with the online request?

                  PS: Live HTTP Headers shows that everything is OK in all 4 cases:

                    HTTP/1.1 200 OK
                    Content-Length: 4742
                  

                  PS2: Apache local web server on VMWare (host OS Win7, Guest OS Ubuntu, Network adapter – NAT). Browser – Firefox.

                  解決方案

                  status is 0 when your html file containing the script is opened in the browser via the file scheme. Make sure to place the files in your server (apache or tomcat whatever) and then open it via http protocol in the browser. (i.e. http://localhost/myfile.html) This is the solution.

                  這篇關于XMLHttpRequest 狀態 0(responseText 為空)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  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))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)

                  • <i id='MfTNA'><tr id='MfTNA'><dt id='MfTNA'><q id='MfTNA'><span id='MfTNA'><b id='MfTNA'><form id='MfTNA'><ins id='MfTNA'></ins><ul id='MfTNA'></ul><sub id='MfTNA'></sub></form><legend id='MfTNA'></legend><bdo id='MfTNA'><pre id='MfTNA'><center id='MfTNA'></center></pre></bdo></b><th id='MfTNA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='MfTNA'><tfoot id='MfTNA'></tfoot><dl id='MfTNA'><fieldset id='MfTNA'></fieldset></dl></div>

                        <tbody id='MfTNA'></tbody>
                      • <tfoot id='MfTNA'></tfoot>

                      • <small id='MfTNA'></small><noframes id='MfTNA'>

                        <legend id='MfTNA'><style id='MfTNA'><dir id='MfTNA'><q id='MfTNA'></q></dir></style></legend>

                            <bdo id='MfTNA'></bdo><ul id='MfTNA'></ul>
                            主站蜘蛛池模板: 国产精品久久久久久久久久久久 | 国产精品美女久久久免费 | 一级看片免费视频囗交动图 | 日韩在线观看视频一区 | 日韩精品不卡 | 午夜一级黄色片 | 亚洲欧美精品国产一级在线 | 黄色毛片免费视频 | 国产精品欧美一区二区三区 | 欧美一区免费 | 综合久久网 | 久久久噜噜噜久久中文字幕色伊伊 | 激情91 | 一级特黄视频 | 亚洲精品18 | 国产视频在线观看一区二区三区 | 欧美一级高清片 | 国产成人精品区一区二区不卡 | 国产成人精品视频在线观看 | 激情av在线 | 亚洲日本乱码在线观看 | 中文字幕视频在线看 | 操皮视频 | www.色.com| 911网站大全在线观看 | 精品国产一区二区三区日日嗨 | av大片在线 | 日韩一区精品 | 精品一区二区三区在线观看 | 国产精品国产自产拍高清 | 国产成在线观看免费视频 | 国产福利在线小视频 | 亚洲视频第一页 | 中文字幕一区二区三区在线观看 | 欧美一区二区三区 | 国产在线一区二区三区 | 久久伊人精品 | 国产亚洲人成a在线v网站 | 国产视频黄色 | 国产98色在线 | 99精品国产一区二区三区 |