Get body element from Document object

Description

document.body returns the body element as HTMLBodyElement

Example


<!DOCTYPE HTML> 
<html> 
    <body> 
        <script> 
            document.writeln(document.body); 
        </script> 
    </body> 
</html><!--  w w w. jav  a 2s  . co m-->

Click to view the demo





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window