<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”.