案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<style>
4
a
5
{
6
color:black;
7
width:150;
8
font:bold;
9
}
10
</style>
11
<script type="text/javascript">
12
var i
13
function glow()
14
{
15
i=0
16
interval=setInterval("makeglow(myLink)",10)
17
}
18
19
function back()
20
{
21
clearInterval(interval)
22
document.getElementById('myLink').style.filter=false
23
}
24
25
function makeglow()
26
{
27
i++
28
if (i<5)
29
    {
30
    document.getElementById('myLink').style.filter="glow(color=#FF00FF,strength=" + i + ")"
31
    }
32
else if (window.interval)
33
    {
34
    clearInterval(interval)
35
    }
36
}
37
</script>
38
</head>
39
40
<body>
41
<a href="/index.html" id="myLink" onmouseover="glow()" onmouseout="back()">请把鼠标移动到链接上</a>
42
</body>
43
44
</html>
45