今天发现了一个非常好的网页特效-可隐藏的树形导航栏,非常棒,代码如下:
<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)" onmouseover=move(82,0) width=100>
<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.onload=position;
}
var sitems=new Array();
var sitemlinks=new Array();