树形目录的问题,哪位高手来给点思路啊??????来者有分!!!!

quicklyonline 2003-09-24 01:48:30
数据结构:

id name group
1 张三 辽宁
2 李四 北京
3 王五 <null>
========================================================
要求实现效果:

+口辽宁
+口北京
+口其他

注:口=CHECKBOX,其他=GROUP为空的组
=========================================================
功能:
1,点辽宁,选中所有下面的结点,再点取消
2,有全展开,全收起按钮
==========================================================
哪位高手帮忙做出来,除了这一百分,开贴再给100分,谢谢!!

做不出来的给点思路也有分!!
...全文
30 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
quicklyonline 2003-09-24
  • 打赏
  • 举报
回复
谢谢 lions911(勇攀高峰) dicklee1214(令狐冲) 在你们两个的帮助下,搞定,谢谢!

其他人每人一分,多谢谢关注!
lions911 2003-09-24
  • 打赏
  • 举报
回复
很简单:将dicklee1214(令狐冲)的VBSCRIPT代码拷到<HEAD>之间,那个是用来显示隐藏用的,然后:在BODY中:循环显示

<div class="parent"><img src="up.gif" class="image" width="11" height="11">友情链接
<div style="display:none">
<a href="21.htm">中国网学</a><br>
<a href="22.htm">清华大学</a><br>
<a href="23.htm">北京大学</a><br>
</div>


将其中的汉字用RS(“字段名”)这样的替换就可以了。

循环用do while not rs.eof loop这个就行了。
wang7655 2003-09-24
  • 打赏
  • 举报
回复
学习学习啊1
bananasmiling 2003-09-24
  • 打赏
  • 举报
回复
你的要求这个网站多的是...
dicklee1214 2003-09-24
  • 打赏
  • 举报
回复
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>链接菜单</title>
</head>
<script language="vbscript">
<!--
sub doclick()
if (window.event.srcelement.classname="parent") or (window.event.srcelement.classname="image") then
expandcollapse
end if
window.event.cancelbubble=true
end sub
sub expandcollapse()
dim objelement
dim objtargetdiv
dim imgicon
set objelement=window.event.srcelement
if objelement.classname="parent" then
set objtargetdiv=objelement.children(1)
set imgicon=objelement.children(0)
else
set objtargetdiv=objelement.parentelement.children(1)
set imgicon=objelement
end if
if objtargetdiv.children.length>0 then
if objtargetdiv.style.display="none" then
objtargetdiv.style.display=""
imgicon.src="up.gif"
else
objtargetdiv.style.display="none"
imgicon.src="next.gif"
end if
end if
end sub
dim oldcolor
sub domouseover()
if window.event.srcelement.tagname="A" then
oldcolor=window.event.srcelement.style.color
window.event.srcelement.style.color="red"
else
window.event.cancelbubble=true
end if
end sub
sub domouseout()
if window.event.srcelement.tagname="A" then
window.event.srcelement.style.color=oldcolor
end if
window.event.cancelbubble=true
end sub
-->
</script>

<body>
<div onclick="doclick" onmouseover="domouseover" onmouseout="domouseout">
<div class="parent"><img src="next.gif" class="image" width="11" height="11">方正集团
<div style="display:none">
<a href="11.htm">公司主页</a><br>
<a href="12.htm">公司简介</a><br>
<a href="13.htm">最新产品</a><br>
</div>
</div>
<div class="parent"><img src="up.gif" class="image" width="11" height="11">友情链接
<div style="display:none">
<a href="21.htm">中国网学</a><br>
<a href="22.htm">清华大学</a><br>
<a href="23.htm">北京大学</a><br>
</div>
</div>
</div>
</body>

</html>
xishanlang2001 2003-09-24
  • 打赏
  • 举报
回复
那就作成兄子二叉树的样子吧,二叉树是很常见的数据结构:)
quicklyonline 2003-09-24
  • 打赏
  • 举报
回复
请大家注意这个数据结构!与以前的树不一样!它没有PARENTID这个字段!!
one_wang 2003-09-24
  • 打赏
  • 举报
回复
你在csdn的黄页中的web开发看看,有个js空间不错,或许有一些启发。
http://www.9499.net/
fason 2003-09-24
  • 打赏
  • 举报
回复
http://fason.nease.net
zanpo 2003-09-24
  • 打赏
  • 举报
回复
http://fason.nease.net/

里面有演示和代码下载

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧