案例: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
  $(".btn1").click(function(){
8
    $("#box").animate({height:"300px"});
9
  });
10
  $(".btn2").click(function(){
11
    $("#box").animate({height:"100px"});
12
  });
13
});
14
</script>
15
</head>
16
<body>
17
<div id="box" style="background:#98bf21;height:100px;width:100px;margin:6px;">
18
</div>
19
<button class="btn1">Animate</button>
20
<button class="btn2">Reset</button>
21
</body>
22
</html>
23