577Chapter 18The Document and Body ObjectsPropertiesMethodsEvent HandlersalinkcreateControlRange()onafterprintbackgroundcreateTextRange()onbeforeprintbgColordoScroll()onscrollbgPropertiesbottomMarginleftMarginlinknoWraprightMarginscrollscrollLeftscrollToptexttopMarginvLinkSyntaxAccessing (Web design portfolio) bodyelement
Sunday, September 30th, 2007577Chapter 18The Document and Body ObjectsPropertiesMethodsEvent HandlersalinkcreateControlRange()onafterprintbackgroundcreateTextRange()onbeforeprintbgColordoScroll()onscrollbgPropertiesbottomMarginleftMarginlinknoWraprightMarginscrollscrollLeftscrollToptexttopMarginvLinkSyntaxAccessing bodyelement object properties or methods: [window.] document.body.property| method([parameters]) About this objectIn object models that reveal HTML element objects, the bodyelement object is the primarycontainer of the content that visitors see on the page. The bodycontains all rendered HTML. This special place in the node hierarchy gives the bodyobject some special powers, especiallyin the IE object model. As if to signify the special relationship, both the IE and W3C object models provide the sameshortcut reference to the bodyelement: document.body. As a first-class HTML elementobject (as evidenced by the long lists of properties, methods, and event handlers covered in Chapter 15), you are also free to use other syntaxes to reach the bodyelement. You are certainly familiar with several bodyelement attributes that govern body-wide contentappearance, such as link colors (in three states) and background (color or image). But IE andNN/Mozilla (and the W3C so far) have some very different ideas about the bodyelement s rolein scripting documents. Many methods and properties that NN/Mozilla considers to be thedomain of the window (for example, scrolling, inside window dimensions, and so forth), IEputs into the hands of the bodyelement object. Therefore, while NN/Mozilla scrolls the win- dow (and whatever it may contain), IE scrolls the body (inside whatever window it lives). Andbecause the bodyelement fills the entire viewable area of a browser window or frame, thatdocument.body
We recommend high quality webhost to host and run your jsp application: christian web host services.