documentElement Property

MS Office DHTML, HTML & CSS

documentElement Property


Retrieves a reference to the root node of the document.

Syntax

HTMLN/A
Scripting[ oElement = ] document.documentElement

Possible Values

oElementObject that specifies the reference to the document element.

The property is read-only with no default value.

Remarks

The root node of a typical HTML document is the HTML object.

Example

This example uses the documentElement property to retrieve the innerHTML property of the entire document.

<SCRIPT>
function fnGetHTML(){
   var sData = document.documentElement.innerHTML;
   oResults.value=sData;
}
</SCRIPT>

<TEXTAREA ID = oResults COLS = 50 ROWS = 10>
</TEXTAREA>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
document

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.