<script src="index.html//cdn.staticfile.net/jquery/2.2.4/jquery.min.js"></script>
<div id="div1" style="height:100px;width:300px;border:1px solid black;background-color:yellow;">
这是 div 中的一些文本。
<p class="part">这是在 div 中的一个段落。</p>
<p>这是在 div 中的另外一个段落。</p>
</div>
<br>
<button>移除div元素</button>
<p>
在使用 remove() 的过滤器删除时,不能删除带有过滤器的子元素。
</p>
xxxxxxxxxx
$(document).ready(function(){
$("button").click(function(){
$("#div1").remove(".part");
});
输入 CSS 代码……