header image
Home arrow Tutorials arrow Javascript arrow Javascript mouseover
Javascript mouseover
 


 


 

Have you ever needed to swap images for an menu?  You can use javascripts onmouseover  and onmouseout to make it happen

Just add the following code to your <img> tag

onmouseover="javascript:this.src='image url';"
onmouseout="javascript:this.src='image url';"

example:

<img src="on.jpg" onmouseover="javascript:this.src='off.jpg';"
onmouseout="javascript:this.src='on.jpg';">

Thats it your menu will now how the classic image rollover.


Get noticed online
So you got a site, but does anyone know where to find you?