案例: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
  $("div").ajaxSend(function(e,xhr,opt){
7
    $(this).html("正在请求:" + opt.url);
8
  });
9
  $("button").click(function(){
10
    $("div").load("/example/jq/demo_ajax_load.html");
11
  });
12
});
13
</script>
14
</head>
15
16
<body>
17
18
<div id="txt"><h2>通过 AJAX 改变文本</h2></div>
19
<button>改变内容</button>
20
21
</body>
22
</html>