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

  • <legend id='PxGyT'><style id='PxGyT'><dir id='PxGyT'><q id='PxGyT'></q></dir></style></legend>
      <bdo id='PxGyT'></bdo><ul id='PxGyT'></ul>

    1. <tfoot id='PxGyT'></tfoot>

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

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

        document.write() 覆蓋文檔?

        document.write() overwriting the document?(document.write() 覆蓋文檔?)

          <tbody id='9ZrgK'></tbody>
        <tfoot id='9ZrgK'></tfoot>

            <legend id='9ZrgK'><style id='9ZrgK'><dir id='9ZrgK'><q id='9ZrgK'></q></dir></style></legend>

            <small id='9ZrgK'></small><noframes id='9ZrgK'>

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

                  本文介紹了document.write() 覆蓋文檔?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  這個:

                  function myFunction()
                  {
                      document.write("sup");
                  }
                  

                  在 html 中調用如下:

                  called in html like:

                  <div id="myDiv">
                      <script>myFunction();</script>
                  </div>t
                  

                  將字符串 sup 添加到 myDiv div 元素.這正是我想要的.但是,這個:

                  adds a string sup to the myDiv div element. Which is what I want, exactly. However, this:

                  function loadFile(uri)
                  {
                      var r = new XMLHttpRequest();
                      document.write("trying to open: " + uri);
                      r.open('GET', uri, true);
                      r.send(null);
                      r.onreadystatechange = function()
                      {
                          if (r.readyState == 4)
                          {
                              myFunction();
                          }
                      }
                  }
                  
                  function myFunction()
                  {
                      document.write("sup");
                  }
                  

                  這樣稱呼:

                  <div id="myDiv">
                      <script>loadFile("filename.txt");</script>
                  </div>
                  

                  似乎覆蓋了我的整個 html 文件.IE.當我在 Firefox 中運行它時,它只顯示字符串 sup (這是頁面的全部內容),但頁面似乎仍在加載(FF 的加載圖標仍然存在動畫,顯然是無限的).

                  seems to be overwriting my whole html file. I.e. when I run it in Firefox it shows me only the string sup (that's the whole content of the page) but the page seems to be still loading (the loading icon of FF is still there animating, apparently infinitely).

                  首先,這將僅在本地離線使用,作為一種快速便捷的數據呈現方式(使用 html+js 和 Web 瀏覽器而不是純文本文件).我想要的是加載一個本地文本文件,然后將它的一些內容作為 html 頁面的一部分.與我的第一個示例相同,但首先加載文本文件.

                  First of all, this is going to be used only locally, offline, as a fast and handy way of presenting data (using html+js and web browser instead of plain text file). What I want is to load a local text file and then put some of its content as a part of the html page. The same as in my first example but with loading the text file first.

                  推薦答案

                  問題是當你在文檔加載后運行 document.write 時,它??會覆蓋整個文檔.如果在此之前運行,它不會覆蓋它.

                  The issue is that when you run document.write after the document has loaded, it overwrites the entire document. If it is run before that, it does not overwrite it.

                  您要做的是設置特定元素的innerHtml,例如:

                  What you want to do is set the innerHtml of a specific element, something like:

                  document.getElementById("myDiv").innerHTML="Sup";
                  

                  這篇關于document.write() 覆蓋文檔?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 部分內容)

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

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

                              <tbody id='L123Y'></tbody>
                            主站蜘蛛池模板: 99热这里| 国产视频中文字幕 | 国产亚洲一区二区三区在线观看 | 国产精品久久久久久久久免费樱桃 | 国产在线不卡 | 亚洲欧美日韩精品 | 天天躁日日躁狠狠躁白人 | 羞羞视频在线观免费观看 | 日本黄色一级片视频 | 自拍中文字幕 | 亚洲一区二区在线播放 | 欧美在线观看一区 | 国产目拍亚洲精品99久久精品 | 99久久精品一区二区成人 | www国产成人 | 精品一区二区三区不卡 | 国产精品免费小视频 | 国产又爽又黄的视频 | 亚州精品天堂中文字幕 | 日本午夜免费福利视频 | 激情视频中文字幕 | 97精品超碰一区二区三区 | 精品视频在线免费观看 | 精品色| 久久综合九九 | 亚洲欧洲在线观看视频 | 亚洲区一区二 | 亚洲 欧美 另类 综合 偷拍 | av久久| 国产特级毛片aaaaaa喷潮 | 中文字幕精品一区 | 国产高清一区二区 | 一色一黄视频 | 97操操| 一区二区三区四区在线视频 | 日本不卡一区二区三区 | 日本免费在线观看视频 | 亚洲精品黑人 | 中文字幕一区二区三区四区不卡 | 国产精品一区二区三区四区 | 欧美激情一区二区 |