案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
4
<script type="text/javascript">
5
function inset(elmnt)
6
{
7
elmnt.style.border="inset 2"
8
}
9
10
function outset(elmnt)
11
{
12
elmnt.style.border="outset 2"
13
}
14
</script>
15
16
<style>
17
td
18
{
19
background:C0C0C0;
20
border:2px outset;
21
}
22
23
</style>
24
</head>
25
<body>
26
27
<table width="80">
28
<tr><td onmouseover="inset(this)" onmouseout="outset(this)"><a href="/">HOME</a></td></tr>
29
<tr><td onmouseover="inset(this)" onmouseout="outset(this)"><a href="/jsjq/javascript/">JavaScript</a></td></tr>
30
<tr><td onmouseover="inset(this)" onmouseout="outset(this)"><a href="http://www.microsoft.com">Explorer</a></td></tr>
31
<tr><td onmouseover="inset(this)" onmouseout="outset(this)"><a href="http://my.netscape.com">Navigator</a></td></tr>
32
<tr><td onmouseover="inset(this)" onmouseout="outset(this)"><a href="http://www.baidu.com">Baidu</a></td></tr>
33
<tr><td onmouseover="inset(this)" onmouseout="outset(this)"><a href="http://www.so.com">SO</a></td></tr>
34
</table>
35
36
</body>
37
</html>