Javascript examples for DOM Event:onmouseenter
Execute a JavaScript when moving the mouse pointer onto an image:
<!DOCTYPE html> <html> <body> <img onmouseenter="bigImg(this)" onmouseleave="normalImg(this)" border="0" src="http://java2s.com/resources/a.png" alt="Smiley" width="32" height="32"> <script> function bigImg(x) {//w w w.j a v a 2 s . c o m x.style.height = "64px"; x.style.width = "64px"; } function normalImg(x) { x.style.height = "32px"; x.style.width = "32px"; } </script> </body> </html>