JavaScript Reference/Javascript Properties/documentElement

Материал из Web эксперт
Перейти к: навигация, поиск

"documentElement" Example

    
<html>
<body>
<button onClick="alert(document.documentElement.nodeName);">Root Node</button>
</body>
</html>



"documentElement" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |document                                                      |
+----------------+--------------------------------------------------------------+



"documentElement" Syntax and Note

Note:
Read-only property. 
Returns the HTML element that contains all the content.
    
Syntax:
    
document.documentElement