新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论.NET,C#,ASP,VB技术
    [返回] 中文XML论坛 - 专业的XML技术讨论区计算机技术与应用『 Dot NET,C#,ASP,VB 』 → [转帖]动态的二级伸缩式的菜单,asp编写 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 9416 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: [转帖]动态的二级伸缩式的菜单,asp编写 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     Qr 帅哥哟,离线,有人找我吗?
      
      
      威望:9
      等级:博士二年级(版主)
      文章:4392
      积分:29981
      门派:XML.ORG.CN
      注册:2004/5/15

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给Qr发送一个短消息 把Qr加入好友 查看Qr的个人资料 搜索Qr在『 Dot NET,C#,ASP,VB 』的所有贴子 访问Qr的主页 引用回复这个贴子 回复这个贴子 查看Qr的博客楼主
    发贴心情 [转帖]动态的二级伸缩式的菜单,asp编写



    这是本来的静态的二级菜单

    <META http-equiv="Content-Type" content="text/html; charset=gb2312">
    <LINK href="admin/adminstyle.css" type="text/css" rel="stylesheet">
    <SCRIPT>
    function aa(Dir)
    {tt.doScroll(Dir);Timer=setTimeout('aa("'+Dir+'")',100)}//这里100为滚动速度
    function StopScroll(){if(Timer!=null)clearTimeout(Timer)}

    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>

    <style type="text/css">
    <!--
    .style1 {color: #FFFFFF}
    -->
    </style>
    <center>
    <script>
    var he=document.body.clientHeight-105
    document.write("<div id=tt style=height:"+he+";overflow:hidden>")
    </script>
    <TABLE cellSpacing="1" cellPadding="0" width="140" align="center" class="a2" ID="Table3">
    <TBODY>
    <TR align="center" class="a1">
    <TD width="140" height="25" align="center" bgcolor="#6381C1" class="menu_title" id="menuTitle1" style="cursor:hand" onclick="showsubmenu(0)" onmouseover="this.className='menu_title2';"
    onmouseout="this.className='menu_title';"><SPAN><span class="style1">四撑杆两瓣抓斗</span>
    </SPAN></TD>
    </TR>
    <TR align="center" class="a3">
    <TD id="submenu0" style="DISPLAY: none">
    <DIV class="sec_menu" style="WIDTH: 140px">
    <TABLE cellSpacing="0" cellPadding="0" width="90%" align="center" ID="Table4">
    <TBODY>
    <TR align="center">
    <TD height="20">
    <a target="main" href="admin_config.asp">网站基本数据</a>
    </TR>
    <TR align="center">
    <TD height="20">
    <a target="main" href="admin_admin.asp?action=admin">管理员管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="book.asp" target="_blank">留言本管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a target="main" href="admin_admin.asp?action=modpass">更改管理员密码</a>
    </TR>
    <TR align="center">
    <TD height="20">
    <a target="main" href="admin_recount.asp">更新首页统计数</a>
    </TR>
    </TBODY></TABLE>
    </DIV>
    </TD>
    </TR>
    </TBODY></TABLE>
    <TABLE width="140" align="center" cellPadding="0" cellSpacing="1" class="a2" ID="Table5">
    <TBODY>
    <TR align="center" class="a1">
    <TD height="25" align="center" bgcolor="#6381C1" class="menu_title" id="menuTitle1" style="cursor:hand" onclick="showsubmenu(3)" onmouseover="this.className='menu_title2';"
    onmouseout="this.className='menu_title';"><SPAN class="style1">四撑杆两瓣抓斗
    </SPAN></TD>
    </TR>
    <TR align="center" class="a3">
    <TD id="submenu3" style="DISPLAY: none">
    <DIV class="sec_menu" style="WIDTH: 130px">
    <TABLE cellSpacing="0" cellPadding="0" width="90%" align="center" ID="Table6">
    <TBODY>
    <TR align="center">
    <TD height="20">
    <a href="admin_diary.asp" target="main">公告管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_diary.asp?action=newdiary" target="main">新添公告</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_vote.asp?action=vote" target="main">投票管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_vote.asp?action=newvote" target="main">新添投票</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_news.aspx" target="main">新闻管理</a> | <a href="admin_news.aspx" target="main">添加</a></TD>
    </TR>

    </TBODY></TABLE>
    </DIV>
    </TD>
    </TR>
    </TBODY></TABLE>
    <TABLE cellSpacing="1" cellPadding="0" width="140" align="center" class="a2" ID="Table7">
    <TBODY>
    <TR align="center" class="a1">
    <TD height="25" align="center" bgcolor="#6381C1" class="menu_title style1" id="menuTitle1" style="cursor:hand" onclick="showsubmenu(2)" onmouseover="this.className='menu_title2';"
    onmouseout="this.className='menu_title';">弹性平衡异步多颚板抓斗</TD>
    </TR>
    <TR align="center" class="a3">
    <TD id="submenu2" style="DISPLAY: none">
    <DIV class="sec_menu" style="WIDTH: 140px">
    <TABLE cellSpacing="0" cellPadding="0" width="90%" align="center" ID="Table8">
    <TBODY>
    <TR align="center">
    <TD height="20">
    <a href="admin_mms.aspx" target="main">彩信管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_dj.asp?action=djerror" target="main">彩铃管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_dj.asp?action=newdj" target="main">新增影音</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_dj.asp?action=djcat" target="main">分类管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_dj.asp?action=newdjcat" target="main">新增分类</a></TD>
    </TR>
    </TBODY></TABLE>
    </DIV>
    </TD>
    </TR>
    <TR align="center" class="a1">
    <TD height="25" align="center" bgcolor="#6381C1" class="menu_title" id="menuTitle1" style="cursor:hand" onclick="showsubmenu(6)" onmouseover="this.className='menu_title2';"
    onmouseout="this.className='menu_title';"><span class="style1">防漏抓斗</span></TD>
    </TR>
    <TR align="center" class="a3">
    <TD id="submenu6" style="DISPLAY: none">
    <DIV class="sec_menu" style="WIDTH: 140px">
    <TABLE cellSpacing="0" cellPadding="0" width="90%" align="center" ID="Table9">
    <TBODY>
    <TR align="center">
    <TD height="19">
    <a href="admin_article.asp" target="main">分类管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_article2.asp" target="main">文章管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="19">
    <a href="admin_article.asp?action=newartcat" target="main">新增分类</a></TD>
    </TR>
    <TR align="center">
    <TD height="19">
    <a href="New_article.asp?action=newart" target="main">新增文章</a></TD>
    </TR>
    </TBODY></TABLE>
    </DIV>
    </TD>
    </TR>
    </TBODY></TABLE>
    <TABLE cellSpacing="1" cellPadding="0" width="140" align="center" class="a2" ID="Table10">
    <TBODY>
    <TR align="center" class="a1">
    <TD height="25" align="center" bgcolor="#6381C1" class="menu_title" id="menuTitle1" style="cursor:hand" onclick="showsubmenu(4)" onmouseover="this.className='menu_title2';"
    onmouseout="this.className='menu_title';"><SPAN><span class="style1">其他相关产品</span>&nbsp;</SPAN></TD>
    </TR>
    <TR align="center" class="a3">
    <TD id="submenu4" style="DISPLAY: none">
    <DIV class="sec_menu" style="WIDTH: 140px">
    <TABLE cellSpacing="0" cellPadding="0" width="90%" align="center" ID="Table11">
    <TBODY>
    <TR align="center">
    <TD height="20">
    <a href="admin_pic.asp?action=piccat" target="main">分类管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_pic.asp?action=newpiccat" target="main">新增分类</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_pic.asp?action=pic" target="main">图片管理</a></TD>
    </TR>
    <TR align="center">
    <TD height="20">
    <a href="admin_pic.asp?action=newpic" target="main">新增图片</a>
    </TD>
    </TR>
    </TBODY></TABLE>
    </DIV>
    </TD>
    </TR>
    </TBODY></TABLE>
    &nbsp;

    asp 动态二级菜单

    <p>
    <%
    set CatRs = Server.CreateObject("ADODB.Recordset")

    CatRsSql = "SELECT * FROM CN_Category"

    CatRs.Open CatRsSql,conn,1,1
    tablenum=3
    %>
    <% Do While Not CatRs.Eof %>
    <%
    If Not CatRs.Eof Then ' http://localhost/Double/product.asp?SubCategoryID=731
    Response.Write "<TABLE cellSpacing='1' cellPadding='0' width='140' align='center' class='a2' ID='Table"&tablenum&"'>"
    tablenum=tablenum+1
    Response.Write "<TBODY>"
    Response.Write "<TR align='center' class='a1'>"
    Response.Write "<TD width='140' height='25' align='center' bgcolor='#6381C1' class='menu_title' id='menuTitle1' style='cursor:hand' onclick='showsubmenu("&tablenum&")' <SPAN><span class='style1'>"
    'Response.Write "<a href='product.asp?CategoryID=" & CatRs("ID") & "'>" & CatRs("CateName") & "</a>"
    Response.Write CatRs("CateName")
    Response.Write"</span> </SPAN></TD>"
    Response.Write "</TR>"
    Response.Write "<TR align='center' class='a3'>"
    Response.Write "<TD id='submenu"&tablenum&"' style='DISPLAY: none'><DIV class='sec_menu' style='WIDTH: 140px'>"
    Response.Write "<TABLE cellSpacing='0' cellPadding='0' width='90%' align='center' ID='Table"&tablenum&"'>"
    tablenum=tablenum+1
    Response.Write "<TBODY>"
    set SubRs = Server.CreateObject("ADODB.Recordset")
    SubRsSql = "SELECT * FROM CN_SubCategory where CategoryID="&CatRs("id")
    SubRs.Open SubRsSql,conn,1,1
    Do While Not SubRs.Eof
    If Not SubRs.Eof Then
    Response.Write "<TR align='center'>"

    Response.Write "<TD height='20'><a target='main' href='product.asp?SubCategoryID="&SubRs("ID")&"'>"&SubRs("SubCategory")&"</a></TD> "

    Response.Write "</TR>"
    SubRs.MoveNext
    End If
    Loop
    SubRs.Close()
    Response.Write "</TBODY>"
    Response.Write "</TABLE>"
    Response.Write "</DIV></TD>"
    Response.Write "</TR>"
    Response.Write " </TBODY>"
    Response.Write " </TABLE>"

    CatRs.MoveNext
    End If
    %>
    <% Loop
    CatRs.Close()
    %>
    </p>


       收藏   分享  
    顶(0)
      




    ----------------------------------------------
    没人帮忙,那就靠自己,自己才是最好的老师!本人拒绝回答通过站内短消息提出的问题!

    blog:http://Qr.blogger.org.cn

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/3/4 12:48:00
     
     tot 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:2
      积分:63
      门派:XML.ORG.CN
      注册:2005/3/11

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给tot发送一个短消息 把tot加入好友 查看tot的个人资料 搜索tot在『 Dot NET,C#,ASP,VB 』的所有贴子 引用回复这个贴子 回复这个贴子 查看tot的博客2
    发贴心情 
    什么内容?
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/3/11 12:09:00
     
     lhbcyl2003 美女呀,离线,快来找我吧!
      
      
      等级:大一新生
      文章:7
      积分:84
      门派:XML.ORG.CN
      注册:2005/6/1

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给lhbcyl2003发送一个短消息 把lhbcyl2003加入好友 查看lhbcyl2003的个人资料 搜索lhbcyl2003在『 Dot NET,C#,ASP,VB 』的所有贴子 引用回复这个贴子 回复这个贴子 查看lhbcyl2003的博客3
    发贴心情 
    太多了,不想看
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/6/1 19:08:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 Dot NET,C#,ASP,VB 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/9/7 12:14:47

    本主题贴数3,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    7,425.781ms