案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<div 
6
onmouseover="mOver(this)" 
7
onmouseout="mOut(this)" 
8
style="background-color:#D94A38;width:200px;height:50px;padding-top:25px;text-align:center;">
9
Mouse Over Me
10
</div>
11
12
<script>
13
function mOver(obj)
14
{
15
obj.innerHTML="谢谢你"
16
}
17
18
function mOut(obj)
19
{
20
obj.innerHTML="把鼠标指针移动到上面"
21
}
22
</script>
23
24
</body>
25
</html>
26