Result Size: 625 x 534
x
 
<!DOCTYPE html>
<html>
<body>
<img onmouseenter="bigImg(this)" onmouseleave="normalImg(this)" border="0" src="smiley.gif" alt="笑脸" width="32" height="32">
<p>当用户将鼠标指针移到图像上时,将触发函数 bigImg()。</p>
<p>当鼠标指针移出图像时,函数 normalImg() 被触发。</p>
<script>
function bigImg(x) {
  x.style.height = "64px";
  x.style.width = "64px";
}
function normalImg(x) {
  x.style.height = "32px";
  x.style.width = "32px";
}
</script>
</body>
</html>