SOURCE

console 命令行工具 X clear

                    
>
console
$(document).ready(function(){
  $("#btn1").click(function(){
    $("#div1").remove();
  });
  $("#btn2").click(function(){
    $("#div1").empty();
  });
});
<div id="div1" style="height:100px;width:300px;border:1px solid black;background-color:yellow;">
   This is some text in the div. 
  <p>This is a paragraph in the div.</p> 
  <p>This is another paragraph in the div.</p> 
 </div> 
 <br> 
 <button id="btn1">删除 div 元素</button>
 <button id="btn2">清空 div 元素</button>