4. Accessing the DOM

In this chapter, we start putting into practice some of the concepts you learned about in previous chapters and begin coding some basic JavaScript. We get into the different ways to manipulate elements within a page, access HTML nodes, and learn how to move up and down the document structure. This is the basis for all JavaScript interaction; as you move forward in your JavaScript life cycle, these are skills you will be using on most days (the good ones, at least).

What Is the DOM?

When you hear people talking about JavaScript, they often mention the “DOM,” or “Document Object Model.” This is one of the most common and important aspects of JavaScript that you’ll encounter. You will use it every time you modify a page and ...

Get Learning JavaScript: A Hands-On Guide to the Fundamentals of Modern JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.