The document Object

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,"

document Object Properties

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 ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.