关键词搜索

源码搜索 ×
×

二级(点击伸开)伸展动态菜单

发布2016-06-02浏览513次

详情内容

<!--#include file="ConnDB.asp"-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function hideAll() {
  for(i=0;i<odiv.length;i++) {
    odiv[i].style.display="none";
  }

function showObj(num) 
{
  
  if (odiv[num].style.display=="none") 
  {
    hideAll();
    odiv[num].style.display="inline";
  }
  else {
    odiv[num].style.display="none";
  }
}
</script>
<style type="text/css">
<!--
.divctrl01{
 cursor:hand;height:25px; /*控制一级类别高度*/
}
.divctrl02{
 cursor:hand;height:25px; /*控制二级类别高度*/
}
body,td,th {
 font-size: 12px;
}
body {
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
}
-->
</style>
</head>

<body>
 <%
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * from GoodsType where mintypeid=0 order by id asc"
rs.Open sql,conn,1,1
if Rs.eof and rs.bof then
Response.Write("没有分类")
Response.end
else
i=0
do while not rs.eof   
 %>
 
<div onClick="showObj(<%= i %>)" class="divctrl01">&nbsp;+&nbsp;<b><%= rs("type") %></b></div>
<div id="odiv" style="display:none" >
<%
        Set rs2=Server.CreateObject("ADODB.RecordSet")
        sql2="SELECT * from GoodsType where mintypeid="&rs("id")&"  order by id desc"
        rs2.Open sql2,conn,1,1
        if Rs2.eof and  rs2.bof then
  Response.Write("")
  else
  
  j=0
        do while not rs2.eof 
 %>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="https://cdn.jxasp.com:9143/image/25">&nbsp;</td>
    <td height="https://cdn.jxasp.com:9143/image/25"><a href="products.asp?id=<%= rs2("id") %>&typen=<%= rs("type") %>"><%= rs2("mintype") %></a></td>
  </tr>
</table>

<%
      rs2.movenext
      loop
   j=j+1
      end if
      rs2.close
      set rs2=nothing
 %>
</div>
<%
i=i+1
rs.movenext
loop
end if
rs.close
set rs=nothing
 %>
</body>
</html>

相关技术文章

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载