案例:jquery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="/js/jquery-1.11.1.min.js">
5
</script>
6
<script>
7
$(document).ready(function(){
8
  $("#btn1").click(function(){
9
    $("p").append(" <b>Appended text</b>.");
10
  });
11
12
  $("#btn2").click(function(){
13
    $("ol").append("<li>Appended item</li>");
14
  });
15
});
16
</script>
17
</head>
18
19
<body>
20
<p>This is a paragraph.</p>
21
<p>This is another paragraph.</p>
22
<ol>
23
<li>List item 1</li>
24
<li>List item 2</li>
25
<li>List item 3</li>
26
</ol>
27
<button id="btn1">追加文本</button>
28
<button id="btn2">追加列表项</button>
29
</body>
30
</html>
31