1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
2 | <html lang="en"> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
---|
5 | <title>test_1.3</title> |
---|
6 | <script type="text/javascript" charset="utf-8" src="jquery.1.4.2.js"></script> |
---|
7 | <script type="text/javascript" charset="utf-8"> |
---|
8 | var snippet = "<div><span id='a'>JS did not run<\/span><script type='text/javascript'>" + |
---|
9 | "$('#a').html('Hooray! JS ran!');" + |
---|
10 | "<\/script><\/div>"; |
---|
11 | $(function(){ |
---|
12 | $('#replaceable').replaceWith($(snippet)[0]); |
---|
13 | }); |
---|
14 | </script> |
---|
15 | </head> |
---|
16 | <body> |
---|
17 | <div id="replaceable">I'm going away.</div> |
---|
18 | </body> |
---|
19 | </html> |
---|