Change element color by setting the color style : Color : Style JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Style » Color »

 

Change element color by setting the color style

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
function colorchange()
{
    head1.style.color = "red";
}

function colorchangeback()
{
    head1.style.color = "black";
}
//  -->
</script>
</head>
<body>
<h1 id="head1" onMouseover="colorchange()" onMouseout="colorchangeback()">
Welcome to this page!</h1>
<P>A lot of interesting text goes here!</p>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Style
» Color