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>
"
)
%>
查看全文
相关阅读:
Nginx出现413 Request Entity Too Large错误解决方法
Apache设置二级域名和虚拟主机
LNMP搭建03 -- 编译安装PHP
LNMP搭建04 -- 配置Nginx支持PHP
LNMP搭建01 -- 编译安装MySQL 5.6.14 和 LNMP相关的区别
LNMP搭建02 -- 编译安装Nginx
vagrant使用小结
LeetCode Count and Say
基于ArcGIS Flex API实现动态标绘(1.0)
HDU 2027 汉字统计
原文地址:https://www.cnblogs.com/zerogo/p/2209396.html
最新文章
(转)WebApi 上传文件
AppCan使用注意问题
Log4J 如何分开Logger输出
Struts2配置详解_配置Action
<转>struts2中Convention中的basePackage与locators配置种种
smarty foreach 最全用法
在smarty模板中嵌入php代码
Hibernate中Criteria的完整用法
hibernate hql 大全
@resource和@autowired的区别
热门文章
Spring注解@Component、@Repository、@Service、@Controller区别
Spring@Autowired注解与自动装配
Android控件GridView之仿支付宝钱包首页带有分割线的GridView九宫格的完美实现
Android动画之仿美团加载数据等待时,小人奔跑进度动画对话框(附顺丰快递员奔跑效果)
详解ListView加载网络图片的优化,让你轻松掌握!
APP中常见上下循环滚动通知的简单实现,点击可进入详情
【转】Android循环滚动广告条的完美实现,封装方便,平滑过渡,从网络加载图片,点击广告进入对应网址
安装php的memcached模块和扩展支持sasl
Ubuntu配置Nginx虚拟主机和支持ThinkPHP
Linux下LNMP启动不了的问题总结(2015.05)
Copyright © 2011-2022 走看看