Home JavaScript Centrality CSS Studio Tools Projects Links
Language Reference Code Examples

DOM (Document Object Model) Reference

The Document Object Model (DOM) is the set of objects, properties, and methods associated with an HTML page. JavaScript can access the DOM to dynamically alter the HTML document.

For example, you can use JavaScript to change the value of a texbox element. You can use JavaScript to show/hide elements. You can even use JavaScript to create new elements out of whole cloth.

Sometimes it is helpful to consider the DOM as a tree, starting with the trunk document and continuing through the main branches, such as body, to the various elements on the page.

In the past, the task of accessing the DOM was made more difficult by the extremely divergent object models used by the major browsers. However, there has been some convergence over the last few years, so cross-browser access to the DOM is much easier than it once was.