The Document Object Model

The Document Object Model, or DOM, is the way that JavaScript represents and interacts with elements of a web page. As the browser interprets tags for a page, an internal representation of them is generated in JavaScript. These JavaScript objects, DOM Element objects, are tightly linked to the display elements in the browser. Because of this link, the JavaScript objects can be used to manipulate the display through their attributes and methods. In order to manipulate the DOM in AJAX applications, a brief explanation is required.

A simple web page, as in the following code and in the file main.html.inc, is easily represented as a series of related JavaScript elements. Each element can have any number of children, a single ...

Get Oracle Database Ajax & PHP Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.