1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title>Tester</title> |
---|
5 | <style type="text/css"> |
---|
6 | #container { background:yellow; width:200px; } |
---|
7 | </style> |
---|
8 | <script type="text/javascript" src="../jquery.js"></script> |
---|
9 | <script type="text/javascript"> |
---|
10 | $(function () { |
---|
11 | $("button:first").click(function () { |
---|
12 | $.ajax({ |
---|
13 | async:true, |
---|
14 | dataType:'script', |
---|
15 | type:'post', |
---|
16 | url:'load.js' |
---|
17 | }); |
---|
18 | var s = "loading..."; |
---|
19 | $("#adiv").text(s); |
---|
20 | }); |
---|
21 | }); |
---|
22 | </script> |
---|
23 | </head> |
---|
24 | <body> |
---|
25 | <button>Do It</button> |
---|
26 | <div id="container"> |
---|
27 | Hi |
---|
28 | </div> |
---|
29 | <div id="adiv"></div> |
---|
30 | </body> |
---|
31 | </html> |
---|