mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 10:42:36 +03:00
22 lines
908 B
HTML
22 lines
908 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<title>DOM element reflection reference</title>
|
||
|
<link rel="stylesheet" type="text/css" href="tst.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1 id="header" class="normal">DOM firstElementChild reference (#header .normal)</h1>
|
||
|
<p><b>body.firstElementChild.id:</b> <script>document.write(document.body.firstElementChild.id);</script></p>
|
||
|
<p><b>body.firstElementChild.className:</b> <script>document.write(document.body.firstElementChild.className);</script></p>
|
||
|
|
||
|
<script>
|
||
|
document.body.firstElementChild.id = "replacedid"
|
||
|
document.body.firstElementChild.className = "replacedclass"
|
||
|
</script>
|
||
|
|
||
|
<h1>DOM firstElementChild reference (#replacedid .replacedclass)</h1>
|
||
|
<p><b>body.firstElementChild.id:</b> <script>document.write(document.body.firstElementChild.id);</script></p>
|
||
|
<p><b>body.firstElementChild.className:</b> <script>document.write(document.body.firstElementChild.className);</script></p>
|
||
|
|
||
|
</body>
|
||
|
</html>
|