Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

documentElement property

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 type="text/javascript">
function fnGetHTML(){
   var sData = document.documentElement.innerHTML;
   oResults.value=sData;
}
</script>
<textarea id = oResults cols = "50" rows = "10">
</textarea>

See also

document

 

 

Show:
© 2014 Microsoft