Javascript DOM HTML Image handle mouse enter and mouse leave event
<!DOCTYPE html> <html> <body> <img onmouseenter="bigImg(this)" onmouseleave="normalImg(this)" border="0" src="image3.png" alt="Circle" width="32" height="32"> <script> function bigImg(x) {//from ww w.j av 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>