案例:html/html5 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script>
5
function bigImg(x)
6
{
7
x.style.height="180px";
8
x.style.width="180px";
9
}
10
11
function normalImg(x)
12
{
13
x.style.height="128px";
14
x.style.width="128px";
15
}
16
</script>
17
</head>
18
<body>
19
20
<img onmousemove="bigImg(this)" onmouseout="normalImg(this)" border="0" src="/img/eg_smile.gif" alt="Smiley" >
21
22
<p>函数 bigImg() 在鼠标指针移动到图像上时触发。此函数放大图像。</p>
23
<p>函数 normalImg() 在鼠标指针移出图像时触发。此函数把图像的高度和宽度重置为正常尺寸。</p>
24
25
</body>
26
</html>
27