summaryrefslogtreecommitdiff
path: root/test/js/doc-dom2.html
blob: a55962bed3974507e2e095de77b43ff506202738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<html>
<head>
<title>DOM getElementById</title>
<link rel="stylesheet" type="text/css" href="tst.css">
</head>
<body>
<h1>DOM getElementById element reference</h1>
<p>This shows the text content of an element obtained using <a href="http://dom.spec.whatwg.org/#dom-document-getelementbyid">document.getElementById</a></p>
<p>Referenced text</p>
<p id="reftext">DOM getElementById element referenced test text</p>
<p>Inserted text</p>
<p><script>document.write(document.getElementById("reftext").textContent);</script></p>
<p>After inserted text</p>

</body>
</html>