久久久久久久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>
                            主站蜘蛛池模板: 亚洲精品一区中文字幕 | 成人久久久 | 综合久久99 | 国产成人精品高清久久 | 九九九国产 | 手机看黄av免费网址 | 最新中文字幕久久 | 精品久久久久一区二区国产 | 国产精品免费视频一区 | 视频一区中文字幕 | 国产精品久久午夜夜伦鲁鲁 | 久久精品亚洲精品 | 亚洲在线免费观看 | 91在线看| 午夜电影福利 | 在线视频91 | 国产视频中文字幕在线观看 | 久久激情视频 | 在线第一页| 久精品视频 | 亚洲福利网站 | 久久久国产网站 | 亚洲精品久久久一区二区三区 | 亚洲高清成人 | 久久久网 | 国产欧美一区二区三区日本久久久 | 日韩综合在线 | 91精品国产综合久久婷婷香蕉 | 午夜国产一级片 | 国内自拍真实伦在线观看 | 欧美日韩中文字幕在线 | 国产精品日韩在线观看 | 黑人精品 | 久久久精彩视频 | 国产精品一区在线 | 在线视频一区二区 | 久草资源 | 日韩在线观看 | 高清av在线 | 在线观看你懂的网站 | 免费国产视频 |