This sample demonstrates how rollover effects are created using the onmouseover and onmouseout events. Event handlers are set on the document object to process the effects. The style is changed for the SPAN objects when the mouse cursor enters or exits the object. Changing the style provides the rollover effect.
Milk
Cookies
Eggs
Ham
Cheese
Pasta
Chicken
[Right-click and choose View Source from the shortcut menu.]
© 2007 Microsoft Corporation. All rights reserved. Terms of use.