Document.body (Property)

The contents of the <BODY> tag.


DOM level - 1
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Opera - 5.0
Property/method value type:BODY object
JavaScript syntax:-myDocument.body

In MSIE, this property is a reference to a BODYobject. Early versions of Netscape are not DOM compliant and do not support this property since it has no BODY object implemented to refer to. This is corrected in Netscape 6.0 which implements full DOM level 1 compliance.

The DOM level 1 specification states that this property should yield an HTMLElement object. A BODY object is derived from an HTMLElement so that general rule is satisfied.

If the document is a frameset then it will return a FRAMESET object.

See also:BODY object, Document object, Window.pageXOffset, Window.pageYOffset

Property attributes: