O'Reilly logo

Sams Teach Yourself JavaScript™ in 24 Hours, Fifth Edition by Phil Ballard, Michael Moncur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hour 11. Navigating the DOM

What You’ll Learn in This Hour

• The concept of nodes

• The different types of node

• Using nodeName, nodeType, and nodeValue

• Using the childNodes collection

• Selecting elements with getElementsByTagName()

• How to use Mozilla’s DOM Inspector

You’ve already learned about the W3C DOM and, in the worked examples of previous hours, you used various DOM objects, properties, and methods.

In this hour you begin exploring how JavaScript can directly interact with the DOM. In particular, you learn some new ways to navigate around the DOM, selecting particular DOM objects that represent parts of the page’s HTML contents.

DOM Nodes

In Part I, “First Steps with JavaScript,” you were introduced to the W3C Document Object ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required