Any DOM studs out there?
Was reading here:
http://www.w3schools.com/htmldom/dom_nodes_access.asp.. under heading labeled "Navigating Node Relationships" (~ half-way down),
using the following markup:
Code:<html>
<body>
<p>Hello World!</p>
<div>
<p>The DOM is very useful!</p>
<p>This example demonstrates node relationships.</p>
</div>
</body>
</html>
.. where it says:
Quote:In the HTML code above, the first p element is the first child node (firstChild) of the body element, and the div element is the last child node (lastChild) of the body element.
Furthermore, the <body> is the parent (parentNode) of the every p element.
uh, wouldn't the
div element (not the body element) be the parentNode of the two p elements contained within it? (the last 2 paragraphs) Or am I missing something?