案例: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").animate({textIndent:"30px"});
8
  });
9
  $(".btn2").click(function(){
10
  $("p").animate({textIndent:""});
11
  });
12
});
13
</script>
14
</head>
15
<body>
16
<p>This is a paragraph. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text. This is some more text.</p>
17
<button class="btn1">Animate</button>
18
<button class="btn2">Reset</button>
19
</body>
20
</html>
21