This page shows a simple example of image rollover. Move your mouse to the following image and see it change.
Here's the HTML code:
<img id="id07896" src="i/tile_A.png" alt="tile A">
Following is the JavaScript code:
var myobj = document.getElementById("id07896"); myobj.onmouseover = function() { myobj.src="i/tile_B.png";}; myobj.onmouseout = function() { myobj.src="i/tile_A.png";};blog comments powered by Disqus