用JSP实现查询树结构表
用JSP实现查询树结构表,在JSP中布局用table,显示成有层次的格式
------解决方案--------------------我的树,用javascript做的。只要放在网页里就可以,当然还要有图片
<HTML>
<HEAD>
<title> IE-Menu </title>
<script LANGUAGE= "JavaScript ">
<!--
//每个节点有一个数组,包含 4+n个元素
// node[0]为0/1 对应节点的展开/关闭
// node[1]为0/1 对应文件夹的关闭/展开
// node[2]为1 如果节点的子节点是文档
// node[3]是节点的名称
// node[4]...node[4+n]为n个子节点
// 初始化菜单的数据
function generateTree()
{
var aux1, aux2, aux3, aux4
foldersTree = folderNode( "我的网站 ")
aux1 = appendChild(foldersTree, folderNode( "娱乐天地 "))
aux2 = appendChild(aux1, leafNode( "literature "))
appendChild(aux2, generateDocEntry(0, "文学巨著 ", "basefolder.htm ", " "))
appendChild(aux2, generateDocEntry(0, "杂家杂谈 ", "basefolder.htm ", " "))
aux2 = appendChild(aux1, leafNode( "Music "))
appendChild(aux2, generateDocEntry(0, "世纪流行风 ", "basefolder.htm ", " "))
appendChild(aux2, generateDocEntry(0, "民乐赏析 ", "basefolder.htm ", " "))
appendChild(aux2, generateDocEntry(0, "器乐演奏 ", "basefolder.htm ", " "))
aux1 = appendChild(foldersTree, folderNode( "资料仓库 "))
aux2 = appendChild(aux1, leafNode( "SoftWare "))
appendChild(aux2,generateDocEntry(1, "系统软件 ", "basefolder.htm ", " "))
appendChild(aux2,generateDocEntry(1, "工具软件 ", "basefolder.htm ", " "))
appendChild(aux2,generateDocEntry(1, "
游戏
", "basefolder.htm ", " "))
aux2 = appendChild(aux1, folderNode( "SourcePrograme "))
aux3 = appendChild(aux2, leafNode( "JavaScript "))
appendChild(aux3, generateDocEntry(1, "第一期 ", "basefolder.htm ", " "))
appendChild(aux3, generateDocEntry(1, "第二期 ", "basefolder.htm ", " "))
appendChild(aux3, generateDocEntry(1, "第三期 ", "basefolder.htm ", " "))
aux3 = appendChild(aux2, leafNode( "ASP "))
appendChild(aux3, generateDocEntry(1, "第一期 ", "basefolder.htm ", " "))
appendChild(aux3, generateDocEntry(1, "第二期 ", "basefolder.htm ", " "))
aux3 = appendChild(aux2, leafNode( "PHP "))
appendChild(aux3, generateDocEntry(1, "第一期 ", "basefolder.htm ", " "))
appendChild(aux3, generateDocEntry(1, "第二期 ", "basefolder.htm ", " "))
appendChild(aux3, generateDocEntry(1, "第三期 ", "basefolder.htm ", " "))
appendChild(aux3, generateDocEntry(1, "第四期 ", "basefolder.htm ", " "))
aux3 = appendChild(aux2, leafNode( "CGI "))
appendChild(aux3,generateDocEntry(1, "第一期 ", "basefolder.htm ", " "))
appendChild(aux3,generateDocEntry(1, "第二期 ", "basefolder.htm ", " "))
appendChild(a