document Properties Object Properties Summary
Returns a reference to the document object.
HTML |
N/A |
Script |
oElement = document.documentElement; |
oElement |
Reference to the document element. |
The property is read-only with no default value.
This is a convenience attribute that allows direct access to the child node that is the root element of the document. For HTML documents, this is the element with the tagName "HTML
".
The following sample demonstrates use of the documentElement property to retrieve the innerHTML of the entire document.
<script language="JavaScript">
function getDoc ( ) {
var docData = document.documentElement.innerHTML;
alert ( docData );
}
</script>
This feature requires Microsoft® Internet Explorer® 5 or later.
Show me
document