The Web Professional's Handbook | 2
The Web Professional's
Handbook
Chapter 6: Document Object Models
When you use JavaScript, you often want to influence certain HTML elements. This may be as simple as retrieving the contents of a form field and validating it, or it can be as complex as removing certain paragraphs from the page and inserting images in their place. However, before you can do anything with an element, you must tell the browser exactly which element you want to manipulate. You must be very explicit in giving these commands: all browsers must understand which element you mean.
It's here that the Document Object Model or DOM comes into play. Each browser that supports JavaScript has some sort of DOM: some way of providing access to HTML elements. Of course, older browsers offer only limited access to elements, while modern browsers allow you to access any part of the HTML page.
There are no less than four "Document Object Models". This chapter deals with all of them.
Excerpt Contents
|
Created: March 8, 2003
Revised: March 8, 2003
URL: https://webreference.com/programming/professional/