我想从我的对象中删除一个特定的类,因为我的要求是在显示内容之前删除该dom数据.我已经编写了一个示例代码,但是不能得到为什么不起作用.我
jquery的删除也不行.请帮我解决.提前致谢
<html> <head> <title>test</title> <script type="text/javascript" src="jquery-1.5.min.js"></script> <script type="text/javascript"> $(document).ready(function() { // complete html var test; test = $('#issue_detail_first_row').html(); var x = $(test).find('#issue_detail_nav').not('.p1'); $('#sett').html(x); }); </script> </head> <body> <div id="issueDetailContainer"> <div id="issue_detail_first_row"> <div> <div id="issue_detail_nav"> <div>test</div> <div id="gett"> <div class="p1"> this content need to be deleted 1 </div> </div> <div class="p1"> this content need to be deleted 2 </div> </div> </div> </div> <br/><br/><br/><br/> <div id="sett"> </div>