欢迎光临
我们一直在努力

动态的二级伸缩式的菜单,asp编写-ASP教程,ASP应用

建站超值云服务器,限时71元/月

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

  <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)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 动态的二级伸缩式的菜单,asp编写-ASP教程,ASP应用
分享到: 更多 (0)