More ambitious effects
onMouseOver can be used to trigger other events as well. In the example on the left we've just added an extra line of code to each onMouseOver and onMouseOut handler and rolling over one image now makes the other change as well. This should be pretty obvious from the source, below.
But don't let your imagination stop here. Like any other event handlers onMouseOver and its compadre onMouseOut can take any piece of JavaScript and run it, so rolling over could open a new page, or a pop-up dialogue.
Back | Next