Append text node created to the end of document - Javascript DOM

Javascript examples for DOM:Document createTextNode

Description

Append text node created to the end of document

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/* w  w w  .  j a  v  a 2  s .c  o m*/
document.body.appendChild(document.createTextNode(window.getComputedStyle(document.getElementById("im1")).display));
}

      </script> 
   </head> 
   <body> 
      <textarea id="im1">Test</textarea>  
   </body>
</html>

Related Tutorials