Javascript examples for CSS Style Property:color
Change element style color red
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from ww w. j a va2 s .co m*/ document.getElementById('red').onclick = function(){ this.style.color = "red"; } } </script> </head> <body> <ul> <li> <a id="red" href="#">List Item with Function</a> </li> <li> <a href="#">List Item without Function</a> </li> </ul> </body> </html>