HTML and CSS Reference
Here's the code in more detail:
var d = document.getElementById('second');
var p = document.createElement('p');
var t = document.createTextNode(
'Paragraph in the second div');
Add the text node
to the paragraph.
the <div> .
The DOM is a huge subject, but this introduction has given you an idea
about what it does as a foundation for learning more. Check the final
section of this appendix for additional resources. It's time to complete
case, an inline event handler. A handler is a function that's called when
an event happens (when the event fires ). In this section, you'll see how
Use the simple page you created for exploring the DOM in the previ-
<p>Paragraph in first div</p>