案例: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
    $.getScript("/example/jq/demo_ajax_script.js");
8
  });
9
});
10
</script>
11
</head>
12
<body>
13
14
<button>使用 Ajax 来获得并运行一个 JavaScript 文件</button>
15
16
</body>
17
</html>