2012-08-15 21:48:46 +04:00
|
|
|
<html>
|
|
|
|
<head>
|
2015-08-09 13:57:13 +03:00
|
|
|
<title>DOM firstElementChild reference (title)</title>
|
2012-08-15 21:48:46 +04:00
|
|
|
<link rel="stylesheet" type="text/css" href="tst.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
2015-08-09 13:57:13 +03:00
|
|
|
<h1>DOM firstElementChild reference (body)</h1>
|
2012-11-09 22:03:02 +04:00
|
|
|
<p><b>head.firstElementChild:</b> <script>document.write(document.head.firstElementChild.textContent);</script></p>
|
|
|
|
<p><b>body.firstElementChild:</b> <script>document.write(document.body.firstElementChild.textContent);</script></p>
|
2012-08-15 21:48:46 +04:00
|
|
|
</body>
|
|
|
|
</html>
|