O'Reilly logo

JavaScript Step by Step by Steve Suehring

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

Chapter 12. The Document Object Model

After completing this chapter, you will be able to

  • Use the Document Object Model (DOM) to retrieve elements from a document.

  • Create new elements in a document.

  • Make changes to elements in a document.

  • Remove elements from a document.

The Document Object Model defined

The Document Object Model (DOM) provides a way to access and alter the contents of Hypertext Markup Language (HTML) documents. The DOM is a standard defined by the World Wide Web Consortium (W3C). Most Internet browsers implement the DOM in various forms—and with varying degrees of success.

Like many other standards, especially those related to web programming, the DOM has evolved over the years. It has three specifications, known as levels in DOM-speak, ...

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