O'Reilly logo

Platinum Edition Using XHTML™, XML, and Java™ 2 by Andrew H. Watt, Mike Morgan, Jim O'Donnell, Eric Ladd

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

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

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