The Document Object Model lets you access and manipulate the contents of Web pages using JavaScript. By using the DOM, you can do wonderful things like:
- Create tabbed Web pages
- Create expandable/collapsible (“accordion”-style) Web page elements
- Generate Web page content dynamically (on the fly)
In this introductory article, you learn about the concept of the DOM, and how it’s used to access Web page elements from within JavaScript.