案例:jQuery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript" src="/js/jquery.js"></script>
4
<script type="text/javascript">
5
$(document).ready(function(){
6
$(".btn1").click(function(){
7
  $("p").empty();
8
  });
9
});
10
</script>
11
</head>
12
<body>
13
<p style="width:200px;height:200px;background-color:yellow">This is a paragraph. <b>Bold</b> and <i>italic</i> text.</p>
14
<button class="btn1">删除 p 元素的内容</button>
15
</body>
16
</html>
17