improve tests

This commit is contained in:
Vincent Sanders 2012-11-01 21:12:21 +00:00
parent 5496a60431
commit 8f08f820f4
2 changed files with 9 additions and 5 deletions

View File

@ -4,9 +4,13 @@
<link rel="stylesheet" type="text/css" href="tst.css"> <link rel="stylesheet" type="text/css" href="tst.css">
</head> </head>
<body> <body>
<h1 id="heading">Direct DOM element reference</h1> <h1>DOM getElementById element reference</h1>
<p>Before</p> <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>
<script>document.write(document.getElementById("heading").textContent);</script> <p>Referenced text</p>
<p>Afterwards</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> </body>
</html> </html>

View File

@ -10,7 +10,7 @@
</ul> </ul>
<h2>Document write tests</h2> <h2>Document write tests</h2>
<ul> <ul>
<li><a href="inline-doc-write-simple.html">Simple docuemnt write</a></li> <li><a href="inline-doc-write-simple.html">Simple document write</a></li>
<li><a href="noscript-inline-doc-write.html">Script within inline script document write with noscript alternative</a></li> <li><a href="noscript-inline-doc-write.html">Script within inline script document write with noscript alternative</a></li>
<li><a href="inline-doc-write.html">Script within inline script</a></li> <li><a href="inline-doc-write.html">Script within inline script</a></li>
<li><a href="sync-script.html">External syncronous script</a></li> <li><a href="sync-script.html">External syncronous script</a></li>