案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
<td rowspan="5" align="center" bgcolor="#FF8080">M<br />E<br />N<br />U</td></tr>
 
1
<html>
2
<head>
3
<style>
4
body{font-family:arial;}
5
a{color:black;text-decoration:none;font:bold}
6
a:hover{color:#606060}
7
td.menu{background:lightblue}
8
9
table.nav
10
{
11
background:black;
12
position:relative;
13
font: bold 80% arial;
14
top:0px;
15
left:-135px;
16
margin-left:3px;
17
}
18
</style>
19
<script type="text/javascript">
20
var i=-135
21
var c=0
22
var intHide
23
var speed=3
24
function show_hide_menu()
25
{
26
if (c==0)
27
    {
28
    c=1
29
    clearInterval(intHide)
30
    intShow=setInterval("show()",10)
31
    }
32
else
33
    {
34
    c=0
35
    clearInterval(intShow)
36
    intHide=setInterval("hide()",10)
37
    }
38
}
39
function show()
40
{
41
if (i<-12)
42
    {
43
    i=i+speed
44
    document.getElementById('myMenu').style.left=i
45
    }
46
}
47
function hide()
48
{