Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用JQuery删除具有特定单词id或类的div并保留内部内容_Jquery - Fatal编程技术网

如何使用JQuery删除具有特定单词id或类的div并保留内部内容

如何使用JQuery删除具有特定单词id或类的div并保留内部内容,jquery,Jquery,我的页面中有以下HTML <div class="bi-tearm-rightdesc"> <div class="bi-tearm-scrollbox customscrollbar mCustomScrollbar _mCS_1"><div id="mCSB_1" class="mCustomScrollBox mCS-light mCSB_vertical mCSB_inside" style="max-height: none

我的页面中有以下HTML

<div class="bi-tearm-rightdesc">
                <div class="bi-tearm-scrollbox customscrollbar mCustomScrollbar _mCS_1"><div id="mCSB_1" class="mCustomScrollBox mCS-light mCSB_vertical mCSB_inside" style="max-height: none;" tabindex="0"><div id="mCSB_1_container" class="mCSB_container" style="position: relative; top: -359px; left: 0px;" dir="ltr">
                    <p>
                        <span class="bold-font">Investment Decisions</span>. The Investor Information web pages are not intended to replace any information or consultation 
provided by a professional financial advisor. Other than the specific information presented in the Investor Information web pages, no information on 
our website is intended to be the basis of or should be relied upon in making an investment decision. Because the North Texas Tollway’s securities 
may involve different sources of payment and security, you should refer to the official statement for any particular security for additional 
information. Materials and information on the North Texas Tollway Authority's website are provided as a public service and intended to provide 
information on matters of public interest. Accordingly, the information in this site is not intended to serve as legal or financial advice.
                    </p>
                    <br>
                    <p><span class="bold-font">Not an Offer to Sell/Buy Securities</span>. The information provided in this website does not constitute an offer to sell 
or buy securities or the solicitation of an offer to sell or buy securities and should not be relied upon to provide specific offering information in 
connection with any issuance, sale, resale, or remarketing of bonds, commercial paper, notes, or other securities.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Dates of Documents; Estimates and Opinions</span>.All documents contained in the Investor Information section of this website 
are marked with a date and speak only as of that date, which may be prior to the date it is posted on this website. No inference should be made that 
the operations of the North Texas Tollway Authority or related entities and/or other economic conditions have remained the same since the date 
indicated. The Investor Information section of this website contains, in part, estimates and matters of opinion which are not intended as statements 
of fact, and no representation is made as to the correctness of such estimates and opinions, or that they will be realized. Any information and 
expressions of opinion herein contained are subject to change without notice.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Information is Subject to Change Without Notice and May Not Be Updated</span>. The North Texas Tollway Authority is under no 
obligation to update any information included in this website and the North Texas Tollway Authority expressly disclaims any duty to provide an update 
of any document contained in this website. The information and expressions of opinion herein are subject to change without notice and the posting of 
information on this website does not imply that there has been no change in the affairs of the North Texas Tollway Authority.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Unavailability of Website</span>.The NTTA makes every effort to keep the website up an in good running condition. However, 
NTTA takes no responsibility for, and is not liable for, the website being temporarily unavailable due to technical issues beyond its control.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Forward-Looking Statements</span>.The documents contained in the Investor Information web pages may contain "forward-looking 
statements" within the meaning of Section 21E of the Securities Exchange Act of 1934, as amended. Such statements may involve known and unknown 
risks, uncertainties, and other factors which may cause the actual results, performance, and achievements to be different from future results, 
performance, and achievements expressed or implied by such forward-looking statements. Investors are cautioned that the actual results could differ 
materially from those set forth in the forward-looking statements.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Interim Financial Information</span>.All interim financial information provided on the Investor Information web pages is 
preliminary and unaudited and subject to adjustment.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Links to Other Websites</span>.The North Texas Tollway Authority may provide links to other websites to allow investors 
independent access to other organizations whose expertise may be of value. The inclusion of any links does not imply a recommendation or endorsement 
of the views expressed within them. The North Texas Tollway Authority has not participated in the preparation, compilation, or selection of 
information on any other website, and assumes no responsibility or liability for the views, content, or accuracy of any other website referenced or 
linked through the North Texas Tollway Authority's website.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Other Information May Be Available</span>. The Investor Information section of this website is provided for the convenience 
of investors in North Texas Tollway Authority, but it does not provide a full and complete set of information that is of interest to investors. There 
may be other documents containing relevant information regarding the North Texas Tollway Authority, which may be available from other sources, 
including by request from the North Texas Tollway Authority.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Disclaimers</span>. THE NORTH TEXAS TOLLWAY AUTHORITY SHALL NOT BE HELD LIABLE FOR ANY IMPROPER OR INCORRECT USE OF THE 
MATERIALS OR INFORMATION CONTAINED ON THIS SITE AND ASSUMES NO RESPONSIBILITY FOR ANY USER'S USE OF THEM. IN NO EVENT SHALL THE NORTH TEXAS TOLLWAY 
AUTHORITY BE LIABLE, WITHOUT LIMITATION, FOR ANY DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS SITE OR THE MATERIALS AND INFORMATION CONTAINED ON 
THIS SITE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE, WHETHER INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL. THIS DISCLAIMER OF 
LIABILITY APPLIES TO ANY DAMAGES OR INJURY WHETHER FOR BREACH OF CONTRACT, TORTIOUS BEHAVIOR, NEGLIGENCE, OR UNDER ANY OTHER CAUSE OF ACTION.
                    </p>
                    <p><br>THE MATERIALS IN THIS SITE ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND EXPRESS OR IMPLIED. TO THE FULLEST EXTENT PERMISSIBLE, THE 
NORTH TEXAS TOLLWAY AUTHORITY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED. THE NORTH TEXAS TOLLWAY AUTHORITY DOES NOT WARRANT OR MAKE ANY 
REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE MATERIALS IN THIS SITE, OR THROUGH LINKS TO OTHER SITES, IN TERMS OF THEIR 
CORRECTNESS, ACCURACY, RELIABILITY, COMPLETENESS OR OTHERWISE.
                    </p>
                    <br>
                    <p>
                        <span class="bold-font">Indemnification</span>. To the extent permitted by applicable law, by using the North Texas Tollway Authority's website, the 
user agrees to defend, indemnify, and hold harmless, the North Texas Tollway Authority, its agencies, officers, employees, representatives, and 
agents from and against all claims and expenses, including attorneys' fees, arising out of the user's use of this site or materials and information 
contained on this site.
                    </p>
                </div><div id="mCSB_1_scrollbar_vertical" class="mCSB_scrollTools mCSB_1_scrollbar mCS-light mCSB_scrollTools_vertical mCSB_scrollTools_onDrag" style="display: block;"><div class="mCSB_draggerContainer"><div id="mCSB_1_dragger_vertical" class="mCSB_dragger mCSB_dragger_onDrag" style="position: absolute; min-height: 30px; display: block; height: 40px; max-height: 300px; top: 47px;"><div class="mCSB_dragger_bar" style="line-height: 30px;"></div></div><div class="mCSB_draggerRail"></div></div></div></div></div>
            </div>
但它也会删除所有子内容。

请查看以下内容:

$("div[class*="mCSB"]").each(function(){
  var e = $(this);
  var inner = $(this).html();
  $(inner).insertBefore(e);
  e.remove();
});
.contents().unwrap()
将选择元素并删除它们,但这仅适用于具有子元素的元素

要删除那些没有子元素的元素,只需将
.end().remove()
链接到末尾即可

$(“div[class*=mCSB],div[id*=mCSB]”。contents().unwrap().end().remove()


投资决策。投资者信息网页无意取代专业财务顾问提供的任何信息或咨询。除中提供的特定信息外
在投资者信息网页中,我们网站上的任何信息都不打算作为投资决策的基础,也不应作为投资决策的依据。因为北德克萨斯收费公路的证券可能涉及不同的付款来源
和安全性,您应该参考任何特定安全性的官方声明以获取更多信息。北德克萨斯州收费公路管理局网站上的材料和信息作为公共服务提供,旨在
关于公共利益事项的信息。因此,本网站中的信息无意作为法律或财务建议。


不是出售/购买证券的要约。本网站提供的信息不构成出售或购买证券的要约,也不构成出售或购买证券的要约征集,因此不应被依赖 提供与债券、商业票据、票据或其他证券的发行、销售、转售或再销售相关的特定发行信息。


文件日期;评估和意见。本网站投资者信息部分中包含的所有文件均标有日期,且仅在该日期(可能早于发布日期)起生效 发布在这个网站上。不得推断自所示日期起,北德克萨斯州收费公路管理局或相关实体的运营和/或其他经济状况保持不变。投资者资料组 本网站的部分内容包含并非作为事实陈述的估计和意见事项,且未就此类估计和意见的正确性或其将实现作出任何陈述。任何信息 本协议中的意见表达如有变更,恕不另行通知。


信息如有变更,恕不另行通知,不得更新。北德克萨斯州收费公路管理局没有义务更新本网站和北德克萨斯州收费公路管理局中包含的任何信息 明确否认有义务提供本网站所载任何文件的更新。此处的信息和意见表达可能会发生更改,恕不另行通知,在本网站上发布信息并不意味着 北德克萨斯州收费公路管理局的事务没有变化。


网站不可用。NTTA尽一切努力保持网站处于良好运行状态。但是,NTTA对网站暂时不可用不承担任何责任 由于其无法控制的技术问题。


前瞻性声明。投资者信息网页中包含的文件可能包含《1934年证券交易法》第21E节(经修订)所指的“前瞻性声明”。 此类声明可能涉及已知和未知的风险、不确定性和其他因素,这些因素可能导致实际结果、绩效和成就与本协议明示或暗示的未来结果、绩效和成就不同 这些前瞻性声明。投资者应注意,实际结果可能与前瞻性声明中规定的结果存在重大差异。


中期财务信息。投资者信息网页上提供的所有中期财务信息都是初步的、未经审计的,可能会进行调整。


与其他网站的链接。北德克萨斯州收费公路管理局可提供与其他网站的链接,以允许投资者独立访问其专业知识可能有价值的其他组织。包含任何链接 并不意味着建议或认可其内部表达的观点。北德克萨斯州收费公路管理局未参与任何其他网站上信息的编制、汇编或选择,且不承担任何责任 或对通过北德克萨斯州收费公路管理局网站引用或链接的任何其他网站的视图、内容或准确性负责。


可能会提供其他信息。本网站的投资者信息部分是为了方便北德克萨斯州收费公路管理局的投资者而提供的,但并未提供完整的信息 投资者感兴趣的信息。可能有其他文件包含关于北德克萨斯州收费公路管理局的相关信息,可从其他来源获得,包括北德克萨斯州收费公路的要求 权威


免责声明。北德克萨斯州收费公路管理局不对不当或不正确使用包含的材料或信息负责
$("div[class*="mCSB"]").remove();
$("div[id*="mCSB"]").remove();
$("div[class*="mCSB"]").each(function(){
  var e = $(this);
  var inner = $(this).html();
  $(inner).insertBefore(e);
  e.remove();
});