There are lots of example of javascript rollovers on the net, here is the simplest I have been able to build.
Move the mouse over the image
This is what the code looks like
<img src='eyeopen.gif'
onmouseover="this.src='eyeshut.gif' "
onmouseout="this.src='eyeopen.gif' " / >
Exercise
1. Select two small images of the same size and produce the Rollover effect..
The word this is a javascript reserved word for the object we are using, in this case the image.
Be careful with the single and double quotes when building this.
2. Try this page on a tablet or phone.
Note the rollover effect doesn't work.
Research the onmouseover event to find out why.