案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function moveleft()
5
{
6
document.getElementById('image').style.position="absolute"
7
document.getElementById('image').style.left="0"
8
}
9
function moveback()
10
{
11
document.getElementById('image').style.position="relative"
12
}
13
</script>
14
</head>
15
16
<body>
17
18
<img id="image" src="/img/eg_bulbon.gif"
19
onmouseover="moveleft()"
20
onmouseout="moveback()"  />
21
22
</body>
23
</html>
24