案例: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
{
7
  $("button").click(function()
8
  {
9
  $(".test").hide();
10
  });
11
});
12
</script>
13
</head>
14
<body>
15
16
<h2 class="test">This is a heading</h2>
17
<p class="test">This is a paragraph.</p>
18
<p>This is another paragraph.</p>
19
<button type="button">Click me</button>
20
21
</body>
22
</html>
23