案例: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
  $("#start").click(function(){
7
    $("#box").animate({height:300},"slow");
8
    $("#box").animate({width:300},"slow");
9
    $("#box").animate({height:100},"slow");
10
    $("#box").animate({width:100},"slow");
11
  });
12
  $("#stop").click(function(){
13
    $("#box").stop(true);
14
  });
15
});
16
</script> 
17
</head>
18
 
19
<body>
20
21
<p><button id="start">Start Animation</button><button id="stop">Stop Animation</button></p>
22
23
<div id="box" style="background:#98bf21;height:100px;width:100px;position:relative">
24
</div>
25
 
26
</body>
27
</html>
28