⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 隐藏式下拉菜单.txt

📁 这个是 Java Script特效(新),
💻 TXT
字号:
先将下列代码复制到<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>




再将下列代码复制到<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')">[关闭]</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')">[关闭]</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')">[关闭]</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')">[关闭]</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')">[关闭]</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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -