案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function moveover()
5
{
6
document.getElementById('image').src="/img/eg_bulbon.gif"
7
}
8
function moveback()
9
{
10
document.getElementById('image').src="/img/eg_bulboff.gif"
11
}
12
</script>
13
</head>
14
15
<body>
16
17
<b>请把鼠标移动到图像上:</b><br />
18
<img id="image" src="/img/eg_bulboff.gif"
19
onmouseover="moveover()"
20
onmouseout="moveback()" />
21
22
</body>
23
</html>
24