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

    1. <small id='JPzF6'></small><noframes id='JPzF6'>

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

          <bdo id='JPzF6'></bdo><ul id='JPzF6'></ul>
      1. <tfoot id='JPzF6'></tfoot>

        如何使用標簽的 id 去除標簽及其所有內部 html?

        How to strip a tag and all of its inner html using the tag#39;s id?(如何使用標簽的 id 去除標簽及其所有內部 html?)
          <i id='Ztj2u'><tr id='Ztj2u'><dt id='Ztj2u'><q id='Ztj2u'><span id='Ztj2u'><b id='Ztj2u'><form id='Ztj2u'><ins id='Ztj2u'></ins><ul id='Ztj2u'></ul><sub id='Ztj2u'></sub></form><legend id='Ztj2u'></legend><bdo id='Ztj2u'><pre id='Ztj2u'><center id='Ztj2u'></center></pre></bdo></b><th id='Ztj2u'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Ztj2u'><tfoot id='Ztj2u'></tfoot><dl id='Ztj2u'><fieldset id='Ztj2u'></fieldset></dl></div>

              <tbody id='Ztj2u'></tbody>
          1. <tfoot id='Ztj2u'></tfoot>

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

          2. <legend id='Ztj2u'><style id='Ztj2u'><dir id='Ztj2u'><q id='Ztj2u'></q></dir></style></legend>
                <bdo id='Ztj2u'></bdo><ul id='Ztj2u'></ul>

                  本文介紹了如何使用標簽的 id 去除標簽及其所有內部 html?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有以下 html:

                  <身體>bla bla bla bla<div id="myDiv">更多文字<div id="anotherDiv">還有更多文字

                  布拉布拉布拉

                  我想刪除從

                  開始直到結束

                  的所有內容.我該怎么做?

                  解決方案

                  With nativeDOM

                  $dom = 新的 DOMDocument;$dom->loadHTML($htmlString);$xPath = new DOMXPath($dom);$nodes = $xPath->query('//*[@id="anotherDiv"]');if($nodes->item(0)) {$nodes->item(0)->parentNode->removeChild($nodes->item(0));}echo $dom->saveHTML();

                  I have the following html:

                  <html>
                   <body>
                   bla bla bla bla
                    <div id="myDiv"> 
                           more text
                        <div id="anotherDiv">
                             And even more text
                        </div>
                    </div>
                  
                    bla bla bla
                   </body>
                  </html>
                  

                  I want to remove everything starting from <div id="anotherDiv"> until its closing <div>. How do I do that?

                  解決方案

                  With native DOM

                  $dom = new DOMDocument;
                  $dom->loadHTML($htmlString);
                  $xPath = new DOMXPath($dom);
                  $nodes = $xPath->query('//*[@id="anotherDiv"]');
                  if($nodes->item(0)) {
                      $nodes->item(0)->parentNode->removeChild($nodes->item(0));
                  }
                  echo $dom->saveHTML();
                  

                  這篇關于如何使用標簽的 id 去除標簽及其所有內部 html?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機)
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實現)
                  Sending a byte array from PHP to WCF(將字節數組從 PHP 發送到 WCF)
                    <tbody id='MDL34'></tbody>

                1. <legend id='MDL34'><style id='MDL34'><dir id='MDL34'><q id='MDL34'></q></dir></style></legend>

                    <tfoot id='MDL34'></tfoot>
                      <bdo id='MDL34'></bdo><ul id='MDL34'></ul>

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

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

                          1. 主站蜘蛛池模板: 97视频在线看| 欧美中文视频 | 91精品久久久久久久久久入口 | 黄色免费看 | 久久精品视频在线观看 | 91麻豆精品国产91久久久久久 | 精品国产99 | 国产精品久久久久婷婷二区次 | 美女一级黄 | 亚洲一区二区欧美 | 国产精品视频久久 | 亚洲精彩视频在线观看 | 91精品国产一区二区三区 | 国产一级精品毛片 | 操视频网站 | 精品国产伦一区二区三区观看说明 | 日韩精品一区二区三区在线播放 | 91麻豆精品国产91久久久更新资源速度超快 | 亚洲视频免费 | 91在线观看 | 毛片一区二区 | 综合久久综合久久 | 亚洲激情一级片 | 久久久久久国产 | 夜久久| 欧美a在线 | 国产成人免费视频网站视频社区 | 精品国产区 | 亚洲区一区二 | 欧美爱爱视频网站 | 久草免费在线视频 | 91 在线 | 国产精品一区二区三区久久久 | 午夜精品一区二区三区在线播放 | 狠狠久久久| 欧美精品网站 | 国产精品视频久久久 | 日韩av手机在线观看 | 91精品国产综合久久久久久首页 | 欧美一a| 亚洲精品日韩在线观看 |