Javascript examples for CSS Style Property:color
Create random color
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/* www .j a v a 2s .c om*/ window.setInterval(function(){ var t = document.getElementById('test'); var z = '#'+(Math.random()*0xFFFFFF<<0).toString(16); t.style.color = z }, 100); } </script> </head> <body> <div id="outer"> <div id="test"> Generate colors. </div> </div> </body> </html>