get the td color to change color - Javascript CSS Style Property

Javascript examples for CSS Style Property:color

Description

get the td color to change color

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <style id="compiled-css" type="text/css">

body {/*from w w w  .j a va2s . c o  m*/
   color: hsl(0,100%,100%);
}


      </style> 
      <script type="text/javascript">
    window.onload=function(){
var c = window.getComputedStyle(document.getElementById('test'), null).color;
console.log(c);
    }

      </script> 
   </head> 
   <body> 
      <span id="test">testing</span>  
   </body>
</html>

Related Tutorials