上午花了数个小时终于弄明白了在一些网站上面的“动态”菜单显示,即单击一下可以展开,再单击一下可以收拢。妈妈的,搞了半天,原来如此简单。下面对其进行解释。
<!--#include file="includes/conn.asp"-->
<%
if session("admin")="" then
 response.redirect "admin_login.asp"
end if
%>
<html>
<head>
<title>管理导航</title>
<STYLE type=text/css>
BODY {
 BACKGROUND: #CCCCCC url('Images/admin/topbg.gif') repeat-x fixed top; MARGIN: 0px; SCROLLBAR-FACE-COLOR: #C5D5B7; 
 SCROLLBAR-HIGHLIGHT-COLOR: #ffffff;
 SCROLLBAR-SHADOW-COLOR: #ffffff;
 SCROLLBAR-3DLIGHT-COLOR: #C5D5B7;
 SCROLLBAR-ARROW-COLOR: #006600;
 SCROLLBAR-TRACK-COLOR: #999966;
 SCROLLBAR-DARKSHADOW-COLOR: #C5D5B7; font-style:normal; font-variant:normal; font-weight:normal; font-size:12px; font-family:宋体
}
TABLE { BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px}
TD { FONT: 12px 宋体}
IMG { BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: bottom; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px}
A { FONT: 12px 宋体; COLOR: #000000; TEXT-DECORATION: none}
A:hover { COLOR: #009900; TEXT-DECORATION: underline}
.sec_menu { BORDER-RIGHT: white 1px solid; BACKGROUND: #E9EBE2; OVERFLOW: hidden; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid}
.menu_title { }
.menu_title SPAN { FONT-WEIGHT: normal;
 LEFT: 8px;
 COLOR: #333333;
 POSITION: relative;
 TOP: 2px;
 font-size: 14px;
}
.menu_title2 {}
.menu_title2 SPAN {
 FONT-WEIGHT: normal;
 LEFT: 8px;
 COLOR: #333333;
 POSITION: relative;
 TOP: 2px;
 font-size: 14px;
}
</STYLE>
<% 
'菜单显示函数,不需要进行更改
 %>
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<base target="rtop">
</head>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table width=100% cellpadding=0 cellspacing=0 border=0 align=left>
    <tr>
  <td valign=top class="menu_title2">
    <table width=158 border="0" align=center cellpadding=0 cellspacing=0>
  <tr>
    <td height=42 valign=bottom>
   <img border="0" src="images/title.jpg"></td>
  </tr>
</table>
<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr>
        <td height=25 class=menu_title background=Images/admin/bg.gif   onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';  id=menuTitle0 onClick="showsubmenu(0)" style="cursor:hand;">
<% 
'此处需要更改id=menuTitlex onClick="showsubmenu(X)"
 %>
          <p>
          <span><font size="2">管理首页</font><b>&nbsp;&nbsp;
           <a href="admin_logout.asp" target="_top" >退出</a></b></span>
        </td>
  </tr>
  <tr>
    <td style="display:" id='submenu0'> <%' 修改submenuX跟showsubmenu(X)一致  %>
<div class=sec_menu style="width:158">
<table cellpadding=0 cellspacing=0 align=center width=130>
<tr>
                <td height=20>用户名:<%=session("zgc_AdminName") %></td>
              </tr>
<tr>
                <td height=20>权&nbsp;&nbsp;限:后台管理员</td>
              </tr>
</table>
</div>
 </td>
  </tr>
</table>
<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr>
        <td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background="Images/admin/bg.gif" id=menuTitle1 onClick="showsubmenu(2)" style="cursor:hand;">
          <span><font size="2">高级会员(Vip)管理</font></span></td>
  </tr>
  <tr>
    <td style="display:display" id='submenu2'>
<div class=sec_menu style="width:158">
            <table cellpadding=0 cellspacing=0 align=center width=130>
              <tr>
                <td width="15" height=20 align="right"><img src="images/bullet.gif"></td>
                <td width="115"><a href=Admin_SiteConfig.asp target=main>网站信息配置</a></td>
              </tr>
              <tr>
                <td height=20><img src="images/bullet.gif"></td>
                <td height=20><a href="admin_usertype.asp" target="main">系统博客分类管理</a></td>
              </tr>
              <tr>
                <td width="15" height=20><img src="images/bullet.gif"></td>
                <td height=20><a href="admin_class.asp" target="main">系统日志分类管理</a></td>
              </tr>
              <tr>
                <td width="15" height=20><img src="images/bullet.gif"></td>
                <td height=20><a href=Admin_filtrate.asp target=main>日志敏感字过滤管理</a></td>
              </tr>
              <tr>
                <td width="15" height=20><img src="images/bullet.gif"></td>
                <td height=20><a href=Admin_iplock.asp?Action=addconfig target=main>添加屏蔽IP</a>
                  | <a href=Admin_iplock.asp?action=showconfig target=main>管理</a></td>
              </tr>
              </table>
 </td>
  </tr>
</table>
<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr>
        <td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background="Images/admin/bg.gif" id=menuTitle2 onClick="showsubmenu(3)" style="cursor:hand;">
          <span><font size="2">普通会员管理</span></font></td>
  </tr>
  <tr>
    <td style="display:display" id='submenu3'>
<div class=sec_menu style="width:158">
            <table width=130 align=center cellpadding=0 cellspacing=0 >
              <tr>
                <td width="15" height=20><img src="images/bullet.gif"></td>
                <td><a href=admin_user.asp target=main>注册用户管理</a></td>
              </tr>
              <tr>
                <td height=20 ><img src="images/bullet.gif"></td>
                <td height=20 ><a href="admin_rename.asp" target="main">用户改名</a></td>
              </tr>
              <tr>
                <td height=20 ><img src="images/bullet.gif"></td>
                <td height=20 ><a href="admin_user.asp?Action=Update" target="main">更新用户数据</a></td>
              </tr>
              <tr>
                <td height=20><img src="images/bullet.gif"></td>
                <td height=20><a href=admin_admin.asp?Action=Add target=main>添加管理员</a> | <a href=admin_admin.asp target=main>管理</a></td>
              </tr>
            </table>
 </td>
  </tr>
</table>
<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr>
        <td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background="Images/admin/bg.gif" id=menuTitle3 onClick="showsubmenu(4)" style="cursor:hand;">
        <span><font size="2">通知公告管理</span> </font></span>
        </td>
  </tr>
  <tr>
    <td style="display:display" id='submenu4'><div class=sec_menu style="width:158">
            <table cellpadding=0 cellspacing=0 align=center width=130>
              <tr>
                <td width="15" height=20><img src="images/bullet.gif"></td>
                <td><a href=admin_addsysskin.asp?add=first target=main>添加系统模版</a>
                  | <a href=admin_sysskin.asp?action=showconfig target=main>管理</a></td>
              </tr>
              <tr>
                <td height=20><img src="images/bullet.gif"></td>
                <td height=20><a href="admin_skin.asp?action=insys1" target="main">系统模版导入</a>
                  | <a href="admin_skin.asp?action=outsys" target="main">导出</a></td>
              </tr>
              <tr>
                <td height=20><img src="images/bullet.gif"></td>
                <td height=20><a href="admin_adduserskin.asp?add=first" target="main">添加用户模版</a>
                  | <a href="admin_userskin.asp?action=showconfig" target="main">管理</a></td>
              </tr>
              <tr>
                <td height=20><img src="images/bullet.gif"></td>
                <td height=20><a href="admin_skin.asp?action=inuser1" target="main">用户模版导入</a>
                  | <a href="admin_skin.asp?action=outuser" target="main">导出</a></td>
              </tr>
            </table>
      </div>
</td>
  </tr>
</table>
 </td>
  </tr>
</table>
</table>
</body>
</html>