menu.asp
资源名称:ASP.RAR [点击查看]
上传用户:xhjd888
上传日期:2022-07-20
资源大小:203k
文件大小:7k
源码类别:
.net编程
开发平台:
Visual Basic
- <!--#include file="add/ocdb/ocdb.asp"-->
- <style type="text/css">
- <!--
- /*菜单样式定义*/
- #menu{
- clear:both;
- margin-right: auto;
- margin-left: auto;
- width:900px;
- color:#fff;
- background-color:#900;
- }
- /*主菜单样式定义*/
- .mainmenu{
- float:left;
- width:64px;
- font-size:13px;
- color:#fff;
- border-left:1px solid #E0E0E0;
- }
- .menucontent{
- float:left;
- width:80px;
- height:20px;
- color:#fff;
- padding:5px;
- }
- /*子菜单样式定义*/
- .submenu{
- clear:both;
- float:left;
- position:absolute;
- width:80px;
- padding:0px;
- font-size:13px;
- }
- .menucontent{
- float:left;
- width:80px;
- height:20px;
- color:#fff;
- padding:5px;
- }
- .MenuItem,.biank {
- line-height:24px;
- }
- .biank
- {
- border-bottom: #ccc 1px dotted;
- }
- .biank a:link,a:visited {
- color: #333;
- width:100%;
- display:block;
- background-color:#eee;
- text-decoration: none;
- }
- .biank a:hover
- {
- color: #fff;
- width:100%;
- background-color:#900;
- }
- .biank a:hover{
- background-color:#900;
- }
- -->
- </style>
- <style type="text/css">
- .MenuOut
- {
- width:100px;
- clear:both;
- }
- .MenuItem
- {
- width:99px;
- float:left;
- height:auto;
- background-color:#eee;
- color:#000;
- cursor:pointer;
- /*border-bottom: #ccc 1px dotted;*/
- }
- .MenuItemP
- {
- width:100%;
- clear:both;
- height:26px;
- background-color:#eee;
- }
- .SubMenuItem
- {
- width:100px;
- height:auto;
- clear:both;
- background-color:#eee;
- color:#FF0000;
- font-size:12px;
- position:absolute;
- top:0px;
- left:0px;
- }
- .BRC
- {
- clear:both;
- font-size:0px;
- }
- .SubMenuP
- {
- width:1px;
- height:1px;
- font-size:1px;
- float:left;
- position:relative;
- }
- .SubMenuItem ul
- {
- padding:0px;
- margin:0px;
- }
- .SubMenuItem ul li
- {
- list-style:none;
- padding:0px;
- margin:0px;
- }
- </style>
- </head>
- <body>
- <%
- '=========================================================
- '编程者:www.bbkan8.cn
- '=========================================================
- dim jiebie_cha,lm_num_cha,lm_num_cha2,s_jibie,jibie_cha,lanmu_xxx,lanmu_nei_xxx
- ul_num_cha=0
- function tabnum(num)
- tabnum=tabnum+chr(9)+chr(9)+chr(9)
- for i=0 to num
- tabnum=tabnum+chr(9)
- next
- end function
- %>
- <div id="topbanner"></div>
- <div id="menu">
- <%
- dim lanmu_xx
- lanmu_xx=1
- set rs=conn.execute("select top 5 * from class where cwar=0 order by id desc")
- while not rs.eof
- %>
- <div class="mainmenu" onMouseOver="submenu<%=lanmu_xx%>.style.display='block'" onMouseOut="submenu<%=lanmu_xx%>.style.display='none'">
- <div class="menucontent"><a href="#"><%=rs("cname")%></a></div></div>
- <%
- lanmu_xx=lanmu_xx+1
- rs.movenext
- wend
- 'end if
- rs.close
- set rs=nothing
- %>
- </div>
- <%
- dim marginleft
- marginleft=0
- lanmu_xx=1
- lanmu_xxx=1
- lanmu_nei_xxx=1
- set rs=conn.execute("select top 5 * from class where cwar=0 order by id desc")
- while not rs.eof
- %>
- <div class="submenu" style="display:none;margin-left:<%=marginleft%>px;" onMouseOver="submenu<%=lanmu_xx%>.style.display='block'" onMouseOut="submenu<%=lanmu_xx%>.style.display='none'" id="submenu<%=lanmu_xx%>">
- <div class="MenuOut">
- <%
- sql2="select * from class where csub="&rs("id")&" and cwar<>0 order by csub,lmcd"
- set rs2=server.CreateObject("adodb.recordset")
- rs2.open sql2,conn,1,3
- while not rs2.eof
- %>
- <%
- if lanmu_nei_xxx<>1 and rs2("cwar")>0 then
- jibie_cha=rs2("cwar")-s_jibie
- if jibie_cha<0 then
- for i=1 to jibie_cha*-1
- %>
- </ul>
- </div>
- </div>
- </div>
- <%
- next
- ul_num_cha=ul_num_cha-jibie_cha
- 'response.Write("hhh"&int(jibie_cha)*-1&"hhh")
- end if
- end if
- %>
- <%
- if rs2("cwar")=1 then
- if rs2("endclass")=0 then
- %>
- <div class="MenuItemP">
- <div class="MenuItem biank" ><a href="#"> <%=rs2("cname")%></a></div>
- </div>
- <%else%>
- <div class="MenuItemP" onMouseOver="showm('s<%=lanmu_xxx%>');" onMouseOut="hidem('s<%=lanmu_xxx%>');" >
- <div class="MenuItem biank" ><a href="#"> <%=rs2("cname")%> »</a></div>
- <div class="SubMenuP">
- <div class="SubMenuItem" id="s<%=lanmu_xxx%>" style="display:none;" onMouseOut="hidem('s<%=lanmu_xxx%>');">
- <ul>
- <%
- lm_num_cha=lm_num_cha+1
- end if
- end if
- %>
- <%
- if rs2("cwar")>1 then
- if rs2("endclass")=0 then
- %>
- <li><span class="biank" style="width:100%"><a href="#"> <%=rs2("cname")%></a></span></li>
- <%else%>
- <div class="MenuItemP" onMouseOver="showm('s<%=lanmu_xxx%>');" onMouseOut="hidem('s<%=lanmu_xxx%>');" >
- <div class="MenuItem biank" ><a href="#"> <%=rs2("cname")%> »</a></div>
- <div class="SubMenuP">
- <div class="SubMenuItem" id="s<%=lanmu_xxx%>" style="display:none;" onMouseOut="hidem('s<%=lanmu_xxx%>');">
- <ul>
- <%
- lm_num_cha=lm_num_cha+1
- end if
- end if
- %>
- <%
- rs2.movenext
- if rs2.eof then
- rs2.MovePrevious
- jibie_cha=1-rs2("cwar")
- if jibie_cha<0 then
- for i=1 to jibie_cha*-1
- %>
- </ul>
- </div>
- </div>
- </div>
- <%
- next
- ul_num_cha=ul_num_cha-jibie_cha
- 'response.Write("hhh"&int(jibie_cha)*-1&"hhh")
- end if
- rs2.movenext
- end if
- rs2.MovePrevious
- %>
- <%
- s_jibie=rs2("cwar")
- lanmu_xxx=lanmu_xxx+1
- lanmu_nei_xxx=lanmu_nei_xxx+1
- rs2.movenext
- if rs2.eof then
- lanmu_nei_xxx=1
- end if
- wend
- rs2.close
- set rs2=nothing
- response.Write("<br class=""BRC"" />")
- response.Write("</div>")
- response.Write("</div>")
- lanmu_xx=lanmu_xx+1
- marginleft=marginleft+80
- rs.movenext
- wend
- 'end if
- rs.close
- set rs=nothing
- %>
- <script type="text/javascript">
- function init(obj,id)
- {
- showm(id);
- d=$(id);
- obj.onmouseout = function(e)
- {
- d.style.display="none";
- }
- d.onmouseout = function(e)
- {
- d.style.display="none";
- }
- }
- function showm(o)
- {
- var obj=document.getElementById(o);
- obj.style.display="";
- }
- function hidem(o)
- {
- var obj=document.getElementById(o);
- obj.style.display="none";
- }
- function $( id )
- {
- if( typeof(id) == "string" )
- return document.getElementById( id );
- return id;
- }
- </script>