Java Script for Mouse Events

Monday, August 9th, 2010 Programming

<html>
 <head>
 <script type="text/javascript">
 function mouseOver()
 {
 document.getElementById("b1").src ="b_blue.gif";
 }
 function mouseOut()
 {
 document.getElementById("b1").src ="b_pink.gif";
 }
 </script>
 </head>

<body>
 <img border="0"   src="E:\pictures\baby.jpg" id="b1"
 onmouseover="mouseOver()" onmouseout="mouseOut()" /></a>
 </body>
 </html>

output:

The function mouseOver() causes the image to shift to “b_blue.gif”.

The function mouseOut() causes the image to shift to “b_pink.gif”.

1 Comment to Java Script for Mouse Events

Sugar CRM Customization
April 23, 2011

OOH !! thanks for this code

Leave a comment