手记

jquery 实现框的大小变化

<html>
<head>
<script type="text/javascript" src="../jquery/jquery.js" tppabs="http://www.w3school.com.cn/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("#start").click(function(){
  $("#box").animate({height:300},"slow");
  $("#box").animate({width:300},"slow");
  $("#box").animate({height:100},"slow");
  $("#box").animate({width:100},"slow");
  });
});
</script>
</head>
 
<body>

<p><a href="#" id="start">Start Animation</a></p>

<div id="box"
>
</div>
 
</body>
</html>
 

0人推荐
随时随地看视频
慕课网APP