案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
   <tr><td class="menu"><a href="/html/oldhtml/">HTML</a></td></tr>
 
1
<html>
2
<head>
3
<style>
4
body{font-family:arial;}
5
table{background:black;position:absolute;}
6
a{color:black;text-decoration:none;font:bold}
7
a:hover{color:#606060}
8
td.menu{background:lightgreen}
9
table.topnav{font-size:80%;top:0;left:0}
10
table.menu{font-size:100%;bottom:0;z-index:-1}
11
</style>
12
<script type="text/javascript">
13
var i=0
14
var c=0
15
var intHide
16
function show_hide_menu()
17
{
18
if (c==0)
19
    {
20
    clearInterval(intHide)
21
    intShow=setInterval("show()",10)
22
    c=1
23
    }
24
else
25
    {
26
    clearInterval(intShow)
27
    intHide=setInterval("hide()",10)
28
    c=0
29
    }
30
}
31
function show()
32
{
33
if (i>-100)
34
    {
35
    i=i-1
36
    document.all("menu").style.bottom=i
37
    }
38
}
39
function hide()
40
{
41
if (i<0)
42
    {
43
    i=i+1
44
    document.all("menu").style.bottom=i
45
    }
46
}
47
</script>
48