Click to return to the DHTML, HTML     
display Attribute | displ...     domain Property     DHTML Properties    
Web Workshop  |  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:
document


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.