js 自动隐藏的导航栏
时间:2010-10-01 来源:jasonyong
- <SCRIPT language=JavaScript1.2>
- function move(x, y) {
- if (document.all) {
- object1.style.pixelLeft += x;
- object1.style.pixelTop += y;}
- else
- if (document.layers) {
- document.object1.left += x;
- document.object1.top += y;
- }};
- function position() {
- document.object1.left += -82;
- document.object1.top += 0;
- document.object1.visibility = "show"
- };
- function makeStatic() {
- if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}
- else {eval('document.object1.top=eval(window.pageYOffset+20)');}
- setTimeout("makeStatic()",0);}
- </SCRIPT>
- <STYLE type=text/css>.hl {
- BACKGROUND-COLOR: green; COLOR: white; CURSOR: hand
- }
- .n {
- }
- </STYLE>
- <LAYER class=NS onmouseout="move(-132, 0)"
- onmouseover="move(132, 0)" left="0" bgcolor="black" name="object1" top="20"
- visibility="hide">
- <SCRIPT language=JavaScript1.2>
- if (document.all)
- document.write('<DIV ID="object1" style="Position : Absolute ;Left : -82px ;Top : 20px ;Width : 0px ;Z-Index : 20">')
- </SCRIPT>
- <TABLE border=0 cellPadding=2 cellSpacing=1
- onmouseout="move(-82, 0)"
- <TBODY>
- <TR>
- <TD bgColor=#aec9e5><FONT face=宋体 size=3><B>导航菜单</B></FONT></TD>
- <TD align=middle rowSpan=100 width=12>
- <SCRIPT language=JavaScript1.2>
- if (document.all||document.layers)
- document.write("<img src='menui.gif'>")
- </SCRIPT>
- </TD></TR>
- <SCRIPT language=JavaScript1.2>
- <!--
- if (document.all||document.layers)
- makeStatic();
- if (document.layers) {
- window.
- }
- var sitems=new Array();
- var sitemlinks=new Array();
- // 修改这里
- sitems[0]="盼盼家园";
- sitems[1]="盼盼分站";
- sitems[2]="便民服务";
- sitems[3]="精品论坛";
- sitems[4]="html转js";
- sitems[5]="历史今天";
- sitems[6]="盼盼家园";
- sitems[7]="盼盼家园";
- sitems[8]="盼盼家园";
- sitems[9]="盼盼家园";
- sitems[10]="盼盼家园";
- sitems[11]="盼盼家园";
- sitems[12]="盼盼家园";
- sitems[13]="盼盼家园";
- sitemlinks[0]="http://www.panpan.org";
- sitemlinks[1]="http://www1.panpan.org";
- sitemlinks[2]="http://cha.panpan.org";
- sitemlinks[3]="http://bbs.panpan.org";
- sitemlinks[4]="http://http://cha.panpan.org/Tools/Master/Htm_js.asp";
- sitemlinks[5]="http://www.panpan.org/today";
- sitemlinks[6]="http://www.panpan.org";
- sitemlinks[7]="http://www.panpan.org";
- sitemlinks[8]="http://www.panpan.org";
- sitemlinks[9]="http://www.panpan.org";
- sitemlinks[10]="http://www.panpan.org";
- sitemlinks[11]="http://www.panpan.org";
- sitemlinks[12]="http://www.panpan.org";
- sitemlinks[13]="http://www.panpan.org";
- for (i=0;i<=sitems.length-1;i++)
- if (document.all) {document.write('<TR><TD bgcolor=orange onclick="location=\''+sitemlinks[i]+'\'" onmouseover="className=\'hl\'" onmouseout="className=\'n\'"><FONT SIZE=2>'+sitems[i]+'</FONT></TD></TR>')}
- else if (document.layers){document.write('<TR><TD bgcolor="orange"><FONT SIZE=2><A HREF="'+sitemlinks[i]+'">'+sitems[i]+'</A></FONT></TD></TR>')}
- function hl(n) {
- n.className='hl'}
- function n(h) {
- h.className='n'}
- //--></SCRIPT>
- </TBODY></TABLE>
- <SCRIPT language=JavaScript1.2>
- if (document.all)
- document.write('<\/DIV>')
- </SCRIPT>
- </LAYER>
导航栏用的图片在附件中.
也可以自己制作一个新图片
相关阅读 更多 +