Mouseover and Mouse outWe can use OnMouseover and OnMouseout events to trigger various functions or effects. We will try to learn the uses by some demos here.
OnMouseover and OnMouseout on a table row.We can change the background color of a table row by using mouseover events. Same way we can change to different color or restore the original color by using mouseout event. Here is an example.
This is done by using two images. One image is displayed first as a hyper link and with the help of onMouseOut event the other image is displayed. Here are two images
Here is the demo of on Mouse Over and on Mouse out event on a image hyper link
Here is the code of the above demo
Using this technique a push button type image button can be developed. On button is first displayed and the second button with Push effect is displayed once the mouse is placed over it.
Using Multiple ImagesUse different names for each image ( watch the name attribute of images displayed )
This article is written by plus2net.com team.