Get computed style - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window getComputedStyle

Description

Get computed style

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(){/*from   ww w  .j  a va2s  .  c  o m*/
console.log(window.getComputedStyle(document.getElementById("im1")).display));
}

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

Related Tutorials