案例: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
  $("button").click(function(){
7
    $.ajaxSetup({url:"/example/jq/demo_ajax_load.html",success:function(result){
8
      $("div").html(result);}});
9
    $.ajax();
10
  });
11
});
12
</script>
13
</head>
14
15
<body>
16
17
<div id="txt"><h2>通过 AJAX 改变文本</h2></div>
18
<button>改变内容</button>
19
20
</body>
21
</html>