案例: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").slideUp();
8
  });
9
  $(".btn2").click(function(){
10
  $("p").slideDown();
11
  });
12
});
13
</script>
14
</head>
15
<body>
16
<p>This is a paragraph.</p>
17
<button class="btn1">Hide</button>
18
<button class="btn2">Show</button>
19
</body>
20
</html>
21