Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part I: Getting Started > Chapter 3: The Document Object Model

Chapter 3

The Document Object Model

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • Looking at your document as a tree
  • Accessing the DOM from your code
  • Editing your document from the DOM

A web page is an HTML document containing markup tags and content. But, as you develop web apps, you’ll find it more helpful to think of the document as a tree-like structure filled with branches, limbs, and leaf nodes. This “document as hierarchy” concept is exactly what is meant when you hear the term Document Object Model (DOM).

In this chapter, I introduce you to the DOM and walk you through the basics you need to access and manipulate the DOM from your application code.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial