?? 隱藏式下拉菜單.txt
字號:
先將下列代碼復(fù)制到<head></head>之間:
<SCRIPT language=JavaScript>
function MM_showHideLayers() { //v2.0
var i, visStr, args, theObj;
args = MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
visStr = args[i+2];
if (navigator.appName == 'Netscape' && document.layers != null) {
theObj = eval(args[i]);
if (theObj) theObj.visibility = visStr;
} else if (document.all != null) { //IE
if (visStr == 'show') visStr = 'visible'; //convert vals
if (visStr == 'hide') visStr = 'hidden';
theObj = eval(args[i+1]);
if (theObj) theObj.style.visibility = visStr;
} }
}
</SCRIPT>
再將下列代碼復(fù)制到<body></body>之間:
<DIV id=Layer1
style="height: 115; left: 5; position: absolute; top: 47; visibility: hidden; width: 168; z-index: 1">
<TABLE bgColor=#99CCFF border=0 cellPadding=0 cellSpacing=0 height=55
width="40%">
<TBODY>
<TR>
<TD height=49 width="100%">
<P align=center><BR><A
href="http://#">子菜單一</A><BR><A
href="http://#">子菜單二</A><BR><A
href="http://#">子菜單三</A><BR><BR><A
href="http://#"
onmousedown="MM_showHideLayers('document.layers[\'Layer1\']','document.all[\'Layer1\']','hide')">[關(guān)閉]</A><BR></P></TD></TR></TBODY></TABLE></DIV>
<DIV id=Layer2
style="HEIGHT: 115px; LEFT: 75px; POSITION: absolute; TOP: 46px; VISIBILITY: hidden; WIDTH: 200px; Z-INDEX: 2">
<TABLE bgColor=#99CCFF border=0 cellPadding=0 cellSpacing=0 height=55
width="40%">
<TBODY>
<TR>
<TD height=49 width="100%">
<P align=center><BR><A
href="http://#">子菜單一</A><BR><A
href="http://#">子菜單二</A><BR><A
href="http://#">子菜單三</A><BR><BR><A
href="http://#"
onmousedown="MM_showHideLayers('document.layers[\'Layer2\']','document.all[\'Layer2\']','hide')">[關(guān)閉]</A><BR></P></TD></TR></TBODY></TABLE></DIV>
<DIV id=Layer3
style="HEIGHT: 115px; LEFT: 142px; POSITION: absolute; TOP: 45px; VISIBILITY: hidden; WIDTH: 200px; Z-INDEX: 3">
<TABLE bgColor=#99CCFF border=0 cellPadding=0 cellSpacing=0 height=55
width="40%">
<TBODY>
<TR>
<TD height=49 width="100%">
<P align=center><BR><A
href="http://#">子菜單一</A><BR><A
href="http://#">子菜單二</A><BR><A
href="http://#">子菜單三</A><BR><BR><A
href="http://#"
onmousedown="MM_showHideLayers('document.layers[\'Layer3\']','document.all[\'Layer3\']','hide')">[關(guān)閉]</A><BR></P></TD></TR></TBODY></TABLE></DIV>
<DIV id=Layer4
style="HEIGHT: 115px; LEFT: 208px; POSITION: absolute; TOP: 46px; VISIBILITY: hidden; WIDTH: 200px; Z-INDEX: 4">
<TABLE bgColor=#99CCFF border=0 cellPadding=0 cellSpacing=0 height=55
width="40%">
<TBODY>
<TR>
<TD height=49 width="100%">
<P align=center><BR><A
href="http://#">子菜單一</A><BR><A
href="http://#">子菜單二</A><BR><A
href="http://#">子菜單三</A><BR><BR><A
href="http://#"
onmousedown="MM_showHideLayers('document.layers[\'Layer4\']','document.all[\'Layer4\']','hide')">[關(guān)閉]</A><BR></P></TD></TR></TBODY></TABLE></DIV>
<DIV id=Layer5
style="HEIGHT: 115px; LEFT: 273px; POSITION: absolute; TOP: 45px; VISIBILITY: hidden; WIDTH: 200px; Z-INDEX: 5">
<TABLE bgColor=#99CCFF border=0 height=55 width="40%">
<TBODY>
<TR>
<TD height=49 width="100%">
<P align=center><BR><A
href="http://#">子菜單一</A><BR><A
href="http://#">子菜單二</A><BR><A
href="http://#">子菜單三</A><BR><BR><A
href="http://#"
onmousedown="MM_showHideLayers('document.layers[\'Layer5\']','document.all[\'Layer5\']','hide')">[關(guān)閉]</A><BR></P></TD></TR></TBODY></TABLE></DIV>
<TABLE border=0 width=400>
<TBODY>
<TR bgColor=#99CCFF>
<TD>| <A href="http://#"
onmouseover="MM_showHideLayers('document.layers[\'Layer1\']','document.all[\'Layer1\']','show','document.layers[\'Layer2\']','document.all[\'Layer2\']','hidden','document.layers[\'Layer3\']','document.all[\'Layer3\']','hidden','document.layers[\'Layer4\']','document.all[\'Layer4\']','hidden','document.layers[\'Layer5\']','document.all[\'Layer5\']','hidden','document.layers[\'Layer6\']','document.all[\'Layer6\']','hidden')">主菜單一</A>
| <A href="http://#"
onmouseover="MM_showHideLayers('document.layers[\'Layer1\']','document.all[\'Layer1\']','hidden','document.layers[\'Layer2\']','document.all[\'Layer2\']','show','document.layers[\'Layer3\']','document.all[\'Layer3\']','hidden','document.layers[\'Layer4\']','document.all[\'Layer4\']','hidden','document.layers[\'Layer5\']','document.all[\'Layer5\']','hidden','document.layers[\'Layer6\']','document.all[\'Layer6\']','hidden')">主菜單二</A>
| <A href="http://#"
onmouseover="MM_showHideLayers('document.layers[\'Layer1\']','document.all[\'Layer1\']','hidden','document.layers[\'Layer2\']','document.all[\'Layer2\']','hidden','document.layers[\'Layer3\']','document.all[\'Layer3\']','show','document.layers[\'Layer4\']','document.all[\'Layer4\']','hidden','document.layers[\'Layer5\']','document.all[\'Layer5\']','hidden','document.layers[\'Layer6\']','document.all[\'Layer6\']','hidden')">主菜單三</A>
| <A href="http://#"
onmouseover="MM_showHideLayers('document.layers[\'Layer1\']','document.all[\'Layer1\']','hidden','document.layers[\'Layer2\']','document.all[\'Layer2\']','hidden','document.layers[\'Layer3\']','document.all[\'Layer3\']','hidden','document.layers[\'Layer4\']','document.all[\'Layer4\']','show','document.layers[\'Layer5\']','document.all[\'Layer5\']','hidden','document.layers[\'Layer6\']','document.all[\'Layer6\']','hidden')">主菜單四</A>
| <A href="http://#"
onmouseover="MM_showHideLayers('document.layers[\'Layer1\']','document.all[\'Layer1\']','hidden','document.layers[\'Layer2\']','document.all[\'Layer2\']','hidden','document.layers[\'Layer3\']','document.all[\'Layer3\']','hidden','document.layers[\'Layer4\']','document.all[\'Layer4\']','hidden','document.layers[\'Layer5\']','document.all[\'Layer5\']','show','document.layers[\'Layer6\']','document.all[\'Layer6\']','hidden')">主菜單五</A>
| </TD></TR></TBODY></TABLE>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -