Gets a reference to the root node of the document.
Syntax
[ oElement = ] document.documentElement
Possible Values
oElement Object that receives the reference to the document element.The property is read-only. The property has no default value.
The property is read-only. The property has no default value.
Remarks
The root node of a typical HTML document is the html object.
Example
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>
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>
Standards Information
This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
document
Experience Silverlight enabled quickstart tutorials, video training, showcases & more.
By clicking "Click to Install" you accept the Silverlight License Agreement .Silverlight updates automatically, learn more .