始终固定底端导航菜单
from: http://www.jscode.cn/jave_menu/31051053.htm
1 <html>
2 <head>
3 <title>网页特效|Linkweb.cn/Js|---始终固定底端导航菜单</title>
4 </head>
5 <body onLoad='fix()' onScroll="fix()" onResize="fix()">
6 <!--用<body onLoad='fix()' onScroll="fix()" onResize="fix()">替换<body> -->
7 <!--将以下代码加入HTML的<Body></Body>之间-->
8 <script language="javascript">
9 <!--
10 function stat(){
11 var a = pageYOffset+window.innerHeight-document.bar.document.height-15
12 document.bar.top = a
13 setTimeout('stat()',2)
14 }
15 function fix(){
16 nome=navigator.appName
17 if(nome=='Netscape'){
18 stat()
19 }
20 else{
21 var a=document.body.scrollTop+document.body.clientHeight-document.all.bar.offsetHeight+15
22 bar.style.top = a
23 }}
24 //-->
25 </script>
26 <span id="bar" style="position:absolute; left:68px; top:455px; width:614px; height:45px; z-index:9" >
27 <table align="center" border="1" hspace="1" cellpadding="1" bordercolor="#000000" bgcolor="#FFFFFF">
28 <tr align="center">
29
30 <td > <a href="#">网页特效</a></td>
31 <td > <a href="#">文章教程</a></td>
32 </tr></table></span>
33 </body></html>
2 <head>
3 <title>网页特效|Linkweb.cn/Js|---始终固定底端导航菜单</title>
4 </head>
5 <body onLoad='fix()' onScroll="fix()" onResize="fix()">
6 <!--用<body onLoad='fix()' onScroll="fix()" onResize="fix()">替换<body> -->
7 <!--将以下代码加入HTML的<Body></Body>之间-->
8 <script language="javascript">
9 <!--
10 function stat(){
11 var a = pageYOffset+window.innerHeight-document.bar.document.height-15
12 document.bar.top = a
13 setTimeout('stat()',2)
14 }
15 function fix(){
16 nome=navigator.appName
17 if(nome=='Netscape'){
18 stat()
19 }
20 else{
21 var a=document.body.scrollTop+document.body.clientHeight-document.all.bar.offsetHeight+15
22 bar.style.top = a
23 }}
24 //-->
25 </script>
26 <span id="bar" style="position:absolute; left:68px; top:455px; width:614px; height:45px; z-index:9" >
27 <table align="center" border="1" hspace="1" cellpadding="1" bordercolor="#000000" bgcolor="#FFFFFF">
28 <tr align="center">
29
30 <td > <a href="#">网页特效</a></td>
31 <td > <a href="#">文章教程</a></td>
32 </tr></table></span>
33 </body></html>