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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.