Name

BODY — NN n/a IE 4 DOM 1

Synopsis

The BODY object reflects the BODY element, which is distinct from the document object. The BODY object refers to just the element and its nested content. The BODY object is special in IE 4 in that it is the gateway to many important visual aspects of content on the page, such as background, margins, and scrolling. There is a shortcut reference to the object, document.body, so you don’t have to build a reference via the document.all. elementID hierarchy.

HTML Equivalent

<BODY>

Object Model Reference

IE

[window.]document.body

Properties

accessKey

clientTop

leftMargin

outerText

scrollWidth

alink

clientWidth

link

parentElement

sourceIndex

background

document

noWrap

parentTextEdit

style

bgColor

id

offsetHeight

recordNumber

tabIndex

bgProperties

innerHTML

offsetLeft

rightMargin

tagName

bottomMargin

innerText

offsetParent

scroll

text

className

isTextEdit

offsetTop

scrollHeight

title

clientHeight

lang

offsetWidth

scrollLeft

topMargin

clientLeft

language

outerHTML

scrollTop

vLink

Methods

click( )

getAttribute( )

removeAttribute( )

contains( )

insertAdjacentHTML( )

scrollIntoView( )

createTextRange( )

insertAdjacentText( )

setAttribute( )

Collections/Arrays

all[]

children[]

filters[]

Event Handler Properties

Handler

NN

IE

DOM

onafterupdate

n/a

4

n/a

onbeforeunload

n/a

4

Get Dynamic HTML: The Definitive Reference 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.