The <BODY> ElementAs discussed in the beginning of this chapter, the document object came along before the <BODY> element, and as a result, many features in the <BODY> elementsuch as web page colorsare also features in the <BODY> element, although usually with different names . The <BODY> element didn't become visible in JavaScript until Internet Explorer 4.0, in fact, and it has a lot to offer scripters. You can access the <BODY> element either by name or ID (with methods such as getElementById ), or with the body property of the document object, which holds the body object itself; you use the body object like this: document.body.alink = "cyan" . I'll take a look at the JavaScript properties, methods, and events of the <BODY> elementrepresented by the body object in JavaScriptnow. |