Javascript examples for DOM HTML Element:Image
show different images when you pass your mouse over it
<html> <head> <title>rollover demo</title> <script type="text/javascript"> function swap(element, image) { element.src = image;/*ww w . j a v a 2 s .c o m*/ } </script> </head> <body> <img src="home_normal.png" onmouseover="swap(this, 'home_rollover.png');" onmouseout="swap(this, 'home_normal.png');"> <img src="about_normal.png" onmouseover="swap(this, 'about_rollover.png');" onmouseout="swap(this, 'about_normal.png');"> </body> </html>