Review of the Document Object Model (3)

This, then, is the Document Object Model (DOM); just as we could model a real-world object like a radio as a set of objects that we assemble, so we model our document as a set of HTML objects that the browser puts together.

In the case of modeling an HTML document, we have to decide:

In earlier versions of some browsers, the model said that you could manipulate input areas in a form, but that the images on your page weren't objects that you could get to from JavaScript. In the latest browsers, not only can you access the images and the input areas in a form, you can change the text between any two tags, or even change the attributes on virtually any tag.

The other design issue is to decide how the objects nest inside one another, and what the property names and method names ought to be. (Should an element's background color property be called bgColor or backgroundColor? Is it a property of the document as a whole, or just of the <body> tag?)

At this moment, there are three different Document Object Models:

  1. The Netscape Navigator model
  2. The Internet Explorer model
  3. The World Wide Web Consortium standard model
Netscape 6 (Mozilla), Internet Explorer 5 (Macintosh), and Opera all implement -- or purport to implement -- the World Wide Web consortium's Document Object Model. The remainder of these pages investigate how we work with the DOM in Netscape 6 (Mozilla).

  DOM Review (2)  Index Properties