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

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

    <tfoot id='mBhw7'></tfoot>

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

      1. “getElementById 不是函數"嘗試解析 AJAX 響應時

        quot;getElementById not a functionquot; when trying to parse an AJAX response?(“getElementById 不是函數嘗試解析 AJAX 響應時?)

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

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

                    <tbody id='QeTcu'></tbody>
                  本文介紹了“getElementById 不是函數"嘗試解析 AJAX 響應時?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在運行 GM_xmlhttpRequest(在 Greasemonkey 腳本中)并將 responseText 存儲到新創建的 HTML 元素中:

                  I'm running GM_xmlhttpRequest (in a Greasemonkey script) and storing the responseText into a newly created HTML element:

                  var responseHTML = document.createElement('HTML');
                  ...
                  onload: function() { responseHTML.innerHTML = response.responseText; }
                  


                  然后我試圖在 responseHTML:

                  console.log(responseHTML.getElementsByTagName('div'));
                  console.log(responseHTML.getElementById('result_0'));
                  


                  第一個工作正常,但不是第二個.有什么想法嗎?


                  The first works fine, but not the second. Any ideas?

                  推薦答案

                  getElementById 不是 HTML 元素的方法.它是文檔節點的一個方法.因此你不能這樣做:

                  getElementById is not a method of HTML elements. It is a method of the document node. As such you can't do:

                  div.getElementById('foo'); // invalid code
                  

                  您可以通過遞歸遍歷 children 來實現自己的函數來搜索 DOM.在較新的瀏覽器上,您甚至可以使用 querySelector 方法.對于最小的開發,您可以使用 jQuery 或 sizzle.js(jQuery 背后的查詢引擎)等庫.

                  You can implement your own function to search the DOM by recursively going through children. On newer browsers you can even use the querySelector method. For minimal development you can use libraries like jQuery or sizzle.js (the query engine behind jQuery).

                  這篇關于“getElementById 不是函數"嘗試解析 AJAX 響應時?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 部分內容)

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

                      <tbody id='ao3Ph'></tbody>
                    <tfoot id='ao3Ph'></tfoot>

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

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

                            主站蜘蛛池模板: 国产视频中文字幕 | 天堂在线www | 久久久www成人免费无遮挡大片 | 欧美激情精品久久久久久变态 | 天天久久 | 一区二区在线免费观看视频 | 亚洲a毛片 | 日韩一级不卡 | 91看片在线观看 | 久久久123| 日韩在线视频一区二区三区 | 中文字幕av第一页 | 99re热精品视频 | 午夜私人影院 | 久久欧美精品 | 国产wwwcom | 最新91在线| 成人看片在线观看 | 一区二区三区免费 | 欧美99 | 久精品视频 | 亚洲精品一区久久久久久 | 成人午夜精品 | 亚洲精品久久视频 | 国产成人精品一区二区三区在线 | 成人在线免费观看av | 99久久婷婷 | 久久国产精品99久久久久久丝袜 | 国产主播第一页 | 操操日 | 亚洲一区二区黄 | 激情毛片| 羞羞视频在线观看 | 欧美日韩亚洲视频 | 欧美黄色免费网站 | 日韩精品一区二区三区第95 | 一区二区三区韩国 | 天天干夜夜操视频 | 在线欧美激情 | 久久一区二区免费视频 | 日韩久久久久 |