案例:jQuery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="/js/jquery.js">
5
</script>
6
<script>
7
$(document).ready(function(){
8
  $("#btn1").click(function(){
9
    $('#test').load('/example/jq/test1.txt');
10
  })
11
})
12
</script>
13
</head>
14
15
<body>
16
17
<h3 id="test">请点击下面的按钮,通过 jQuery AJAX 改变这段文本。</h3>
18
<button id="btn1" type="button">获得外部的内容</button>
19
20
</body>
21
</html>