access document.body - Javascript jQuery

Javascript examples for jQuery:Document

Description

access document.body

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.0.js"></script> 
      <script type="text/javascript">
    $(function(){//from ww w.ja v a  2 s  . c  o m
var p = document.createElement('p');
p.innerHTML = 'test';
document.body.appendChild(p);
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials