O'Reilly logo

Dynamic HTML: The Definitive Reference, 3rd Edition by Danny Goodman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Document Object Model Reference

This chapter focuses on objects in documents—the scriptable entities that a browser maintains in its memory whenever a document is loaded. Most of these objects are created for you when the browser interprets the tags embedded within the content of the document. But many more objects exist solely for the purposes of scripting activities, such as event processing, window manipulation, creating and populating documents with new objects, reading the client’s system environment, and even XML data that is part of an AJAX exchange with a server.

An object is described by its properties, methods, collections (or arrays) of nested items, and events. The Dynamic HTML features that you associate with a document rely entirely upon the objects and the properties, methods, and events that are supported by the browsers used by the page’s visitors. The scriptable object model of early browsers was a simple one, with relatively few objects, and those objects had short lists of implemented properties, methods, and events. Today’s model, however, is huge, due to a greatly expanded object model for Microsoft Internet Explorer 4 and, more recently, the addition of a completely new (and still growing) abstract object model designed by the W3C. That newest object model, the W3C DOM, is the model for which any new DHTML scripting should be targeted, as it is supported to various extents by all modern mainstream scriptable browsers.

To help you choose the right ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required