documentElement property (Internet Explorer)

Switch View :
ScriptFree
documentElement property

[This documentation is preliminary and is subject to change.]

Gets a reference to the root node of the document.

Syntax

JavaScript

p = object.documentElement

Property values

Type: Object

the reference to the document element.

Standards information

Remarks

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

Examples

This example uses the documentElement property to get 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>

 

 

Build date: 3/8/2012