zoukankan
html css js c++ java
asp动态树菜单集合(2/3)
相关数据库结构请查看
http://blog.csdn.net/piperzero/archive/2006/07/25/977083.aspx
二级树
如下
同时展开一个
<!--
以下是可以同时只能打开一个子目录的二级数
-->
<!--
#include file="inc/conn.asp"
-->
<%
...
set
rs
=
conn.execute(
"
select * from bigclass
"
)
if
rs.recordcount
=
0
then
Response.Write(
"
暂无
"
)
else
i
=
0
while
not
rs.eof
Response.Write(
"
┬ <a href=""javascript:menu
"
&
i
&
"
func()""><b>
"
&
rs(
"
bigclassname
"
)
&
"
</b></a><br>
"
&
CHR
(
10
))
ljh_temp
=
ljh_temp
&
"
menu
"
&
i
&
"
.style.display=""none"";
"
&
CHR
(
10
)
ljh_temp2
=
ljh_temp2
&
"
function menu
"
&
i
&
"
func()
"
&
CHR
(
10
)
&
"
{
"
&
CHR
(
10
)
&
"
if(menu
"
&
i
&
"
.style.display==""none"")
"
&
CHR
(
10
)
&
"
{
"
&
CHR
(
10
)
&
"
startmenu();
"
&
CHR
(
10
)
&
"
menu
"
&
i
&
"
.style.display=""block"";
"
&
CHR
(
10
)
&
"
}
"
&
CHR
(
10
)
&
"
else
"
&
CHR
(
10
)
&
"
{
"
&
CHR
(
10
)
&
"
startmenu();
"
&
CHR
(
10
)
&
"
}
"
&
CHR
(
10
)
&
"
}
"
&
CHR
(
10
)
&
""
set
rs2
=
conn.execute(
"
select * from smallclass where bigclassname='
"
&
rs(
"
bigclassname
"
)
&
"
'
"
)
'
因为是字符型,所以用到了''
if
rs2.recordcount
=
0
then
Response.Write(
"
<div id=""menu
"
&
i
&
"
"" style=""DISPLAY: none"">├ 暂无</div>
"
&
CHR
(
10
))
else
Response.Write(
"
<div id=""menu
"
&
i
&
"
"" style=""DISPLAY: none"">
"
&
CHR
(
10
))
while
not
rs2.eof
Response.Write(
"
├ <a href=""product.asp?bigclassname=
"
&
rs(
"
bigclassname
"
)
&
"
&smallclassname=
"
&
rs2(
"
smallclassname
"
)
&
"
"">
"
&
rs2(
"
smallclassname
"
)
&
"
</a><br>
"
&
CHR
(
10
))
rs2.movenext
wend
Response.Write(
"
</div>
"
&
CHR
(
10
))
end
if
rs2.close
set
rs2
=
nothing
i
=
i
+
1
rs.movenext
wend
end
if
rs.close
set
rs
=
nothing
Response.Write(
"
<script language=""javascript"" type=""text/javascript"">
"
&
CHR
(
10
))
Response.Write(
"
function startmenu()
"
&
CHR
(
10
)
&
"
{
"
&
CHR
(
10
)
&
ljh_temp
&
"
}
"
&
CHR
(
10
))
Response.Write(ljh_temp2)
Response.Write(
"
</script>
"
)
%>
查看全文
相关阅读:
Jzoj3756 【NOI2014】动物园
Bzoj5088 HDU 6000 Wash
Bzoj5088 HDU 6000 Wash
Jzoj3486 道路改建
Jzoj3486 道路改建
合作网络
工人的请愿书
划分成回文串
单向TSP
旅行
原文地址:https://www.cnblogs.com/zerogo/p/2209396.html
最新文章
【Luogu1449】后缀表达式
【Luogu1303】【模板】A*B Problem
【Luogu2142】【模板】高精度减法
【Luogu1601】【模板】A+B Problem(高精)
【Luogu3367】【模板】并查集
jQuery学习-显示与隐藏
jQuery学习- 表单事件
jQuery学习-键盘事件
jQuery学习-鼠标事件
jQuery学习-事件绑定
热门文章
jQuery学习-尺寸坐标
jQuery学习-设置访问元素样式
jQuery学习-访问设置元素内容
jQuery学习- 获取与设置属性的函数
jQuery学习- 子选择器与可见性选择器
Jzoj3648 【GDOI2014】beyond
Jzoj3648 【GDOI2014】beyond
Jzoj4061 字符串树
Jzoj4061 字符串树
Jzoj3756 【NOI2014】动物园
Copyright © 2011-2022 走看看