Team LiB
Previous Section Next Section

Chapter 7: The Document Object Model

Overview

Document objects (not to be confused with JavaScript objects) are scriptable entities that you can use to add a dynamic feel to your Web page. Every HTML element on a Web page has a corresponding document object. As you've seen before, an object is made up of its properties, methods, and event handlers. One of the biggest problems when it comes to working with objects in the Document Object Model (DOM) is the different way in which each browser converts HTML tags into document objects. In JavaScript's current state, there are innumerable different objects, each of which has varying degrees of support in a given browser or operating system.

The first part of this chapter will show you many of the most useful objects in the DOM (an entire listing is outside the scope of this chapter and even this book). This is by no means a complete list of HTML elements that are part of the DOM. Many of the ones that were left out were either not very useful or behaved in obviously the same manner as elements that were listed.

In the second part of the chapter, I'll explain the uses and problems associated with the DOM.


Team LiB
Previous Section Next Section