Use mouse in/out action to trigger the style change : Mouse Event : Event JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Event » Mouse Event »

 

Use mouse in/out action to trigger the style change

















<html>
<head>
<title>Style Example</title>
</head>
<body>
<P>Move your mouse over the square.</p>
<div id="div1"
     style="background-color: red; height: 50px; width: 50px"
     onmouseover="this.style.backgroundColor = 'blue'"
     onmouseout="this.style.backgroundColor = 'red'">
</div>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Event
» Mouse Event