Web browsers also expose an object called document. As you might expect, this object exposes useful properties and methods of the active document. The location object refers only to the URL of the active document, but document refers to the document itself. Chapter 20 discusses the document object in more detail, but its basic properties and methods are shown here.
→ To see an example of using the document object to dynamically create XHTML, see "Filling Your Windows II: The Document Object,"
You can access and manipulate several attributes of the current Web browser document through the document object. Some of the more useful document object properties are the following:
alinkColor— The color of ...