Retrieves a reference to the root node of the document.
Syntax
HTML N/A Scripting [ oElement = ] document.documentElement
Possible Values
oElement Object 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
document