Document
The document
of a window holds all the HTML elements of the web page in that window.
Properties
| FF, IE 3 | Color of a link when you click it |
| FF, IE 3 | Read-only: Array of anchor objects. See "Anchor" on page 413 for more information. |
| FF, IE 3 | Read-only: Array storing the applets in the document. See "Applet" on page 413 for more information. |
| FF, IE 3 | Background color of a page. The value can be the name of a color or a hexadecimal triplet. |
Example:
window.document.bgColor = "#000000";
This line makes the background of a page black.
| FF, IE 4 | Body element of a web page |
| FF, IE 3 | HTML cookie associated with this document. See Chapter 12 for more information on cookies. |
| FF, IE 5 | Read-only: Root element ... |
Get The Book of JavaScript, 2nd Edition 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.