netsurf/test/js/doc-dom1.html

15 lines
375 B
HTML
Raw Normal View History

<html>
<head>
<title>Direct DOM element reference</title>
<link rel="stylesheet" type="text/css" href="tst.css">
</head>
<body>
<h1>Direct DOM element reference</h1>
<p>head</p>
<script>document.write(document.head.firstElementChild.textContent);</script>
<p>body</p>
<script>document.write(document.body.firstElementChild.textContent);</script>
<p>after</p>
</body>
</html>