11 |
</script> |
</script> |
12 |
|
|
13 |
<p><input type=button value=setDocument onclick=" |
<p><input type=button value=setDocument onclick=" |
14 |
|
window.olddoc = document; |
15 |
var doc = document.implementation.createDocument |
var doc = document.implementation.createDocument |
16 |
('http://www.w3.org/1999/xhtml', 'html', null); |
('http://www.w3.org/1999/xhtml', 'html', null); |
17 |
var html = doc.documentElement; |
var html = doc.documentElement; |
21 |
var body = html.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'body')); |
var body = html.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'body')); |
22 |
body.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'p')) |
body.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'p')) |
23 |
.textContent = 'New document.'; |
.textContent = 'New document.'; |
24 |
|
body.onload = "document.getElementById ('atonload').textContent += '\nonload: ' + new Date ();"; |
25 |
var button = body.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'p')) |
var button = body.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'p')) |
26 |
.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'button')); |
.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'button')); |
27 |
button.textContent = 'alert (window.xxxxx)'; |
button.textContent = 'alert (window.xxxxx)'; |
28 |
button.onclick = 'alert (window.xxxxx)'; |
button.onclick = 'alert (window.xxxxx)'; |
29 |
|
body.appendChild (document.createElementNS ('http://www.w3.org/1999/xhtml', 'pre')) |
30 |
|
.setAttributeNS (null, 'id', 'atonload'); |
31 |
setDocument (doc); |
setDocument (doc); |
32 |
"></p> |
"></p> |
33 |
|
|