$(selector).load(URL,data,callback);
下面代码即为加载外部文件的a()函数
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
5 <title>bind函数</title>
6 <script type="text/javascript" src='js/jquery.js'></script>
7 <script type="text/javascript" src='js/test.js'></script>
8 <script type="text/javascript">
9 $(function(){
10 init();
11 })
12 function init(){
13 $('#js_box').bind('load',a());
14 }
15 </script>
16 </head>
17 <body>
18 <div id='js_box'></div>
19 </body>
20 </html>