我做过这样的,是通过ASP读取数据库的数据,然后生成一个树形结构(无限级)如果需要相关资料,请于我联系,给你代码

解决方案 »

  1.   

    thanks linhaibo(美洲豹),
    我的Email:[email protected]
      

  2.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta http-equiv=PRAGMA CONTENT=NO-CACHE>
    <link rel="stylesheet" href="../news.css"></head>
    <body bgcolor="#D6E7E7" topmargin="0" leftmargin="0">
    <table width="148" border="0" cellspacing="0" cellpadding="0" align="left">
      <tr> 
        <td>
    <script language="JavaScript1.2">
    NS4 = (document.layers) ? 1 : 0;
    IE4 = (document.all) ? 1 : 0;
    ver4 = (NS4 || IE4) ? 1 : 0;if (ver4) {
        with (document) {
            write("<STYLE TYPE='text/css'>");
            if (NS4) {
                write(".parent {position:absolute; visibility:visible}");
                write(".child {position:absolute; visibility:visible}");
                write(".regular {position:absolute; visibility:visible}")
            }
            else {
                write(".child {display:none}")
            }
            write("</STYLE>");
        }
    }function getIndex(el) {
        ind = null;
        for (i=0; i<document.layers.length; i++) {
            whichEl = document.layers[i];
            if (whichEl.id == el) {
                ind = i;
                break;
            }
        }
        return ind;
    }function arrange() {
        nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;
        for (i=firstInd+1; i<document.layers.length; i++) {
            whichEl = document.layers[i];
            if (whichEl.visibility != "hide") {
                whichEl.pageY = nextY;
                nextY += whichEl.document.height;
            }
        }
    }function initIt(){
        if (!ver4) return;
        if (NS4) {
            for (i=0; i<document.layers.length; i++) {
                whichEl = document.layers[i];
                if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
           }
            arrange();
        }
        else {
            divColl = document.all.tags("DIV");
            for (i=0; i<divColl.length; i++) {
                whichEl = divColl(i);
                if (whichEl.className == "child") whichEl.style.display = "none";
            }
        }
    }function expandIt(el) {
        if (!ver4) return;
        if (IE4) {
            whichEl = eval(el + "Child");
            if (whichEl.style.display == "none") {
                whichEl.style.display = "block";
            }
            else {
                whichEl.style.display = "none";
            }
        }
        else {
            whichEl = eval("document." + el + "Child");
            if (whichEl.visibility == "hide") {
                whichEl.visibility = "show";
            }
            else {
                whichEl.visibility = "hide";
            }
            arrange();
        }
    }onload = initIt;</script>                    <div id="KB9Parent" class="parent">
    &nbsp;&nbsp;<a href="#" onClick="expandIt('KB9'); return false"><img src="images/i_option.gif" width="20" height="16" border="0">微软技术专区</a></div>
                        <div id="KB9Child" class="child">
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_1_1.shtm" target="forum">Visual C++</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_2_1.shtm" target="forum">Visual Basic</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_9_1.shtm" target="forum">ActiveX/COM</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_20_1.shtm" target="forum">VBA</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_23_1.shtm" target="forum">ASP</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_30_1.shtm" target="forum">.NET Framework</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_18_1.shtm" target="forum">XML/SOAP</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_32_1.shtm" target="forum">ADO.NET</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_33_1.shtm" target="forum">ASP.NET</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_34_1.shtm" target="forum">Web Services</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_35_1.shtm" target="forum">Web Forms</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_36_1.shtm" target="forum">Windows Forms</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_37_1.shtm" target="forum">VB.NET</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_38_1.shtm" target="forum">VC.NET</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_17_1.shtm" target="forum">C#</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_39_1.shtm" target="forum">Windows9x/ME</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_40_1.shtm" target="forum">Win NT/2000/XP</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_41_1.shtm" target="forum">DOS</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_42_1.shtm" target="forum">Office使用</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_43_1.shtm" target="forum">Office开发</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_44_1.shtm" target="forum">Exchange server </a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_45_1.shtm" target="forum">IIS</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,498547823)" target="_blank">微软调查</a><br>
                        </div>
                        <div id="KB3Parent" class="parent">
    &nbsp;&nbsp;<a href="#" onClick="expandIt('KB3'); return false"><img src="images/i_option.gif" width="20" height="16" border="0">软件开发者</a></div>
                        <div id="KB3Child" class="child">
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_3_1.shtm" target="forum">Delphi</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_4_1.shtm" target="forum">C/C++</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_5_1.shtm" target="forum">C++ Builder</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_26_1.shtm" target="forum">Java</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_6_1.shtm" target="forum">ASM</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_7_1.shtm" target="forum">数据库开发</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_19_1.shtm" target="forum">数据仓库</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_8_1.shtm" target="forum">PowerBuilder</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_29_1.shtm" target="forum">嵌入式开发</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_10_1.shtm" target="forum">数据算法</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_11_1.shtm" target="forum">软件工程</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_12_1.shtm" target="forum">图形/游戏/多媒体</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_13_1.shtm" target="forum">安全技术</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_14_1.shtm" target="forum">网络/通讯</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_15_1.shtm" target="forum">技术书籍</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_16_1.shtm" target="forum">文件格式</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_31_1.shtm" target="forum">Lotus开发</a><br>
                        </div>
                        <div id="KB2Parent" class="parent"> 
    &nbsp;&nbsp;<a href="#" onClick="expandIt('KB2'); return false"><img src="images/i_option.gif" width="20" height="16" border="0">计算机用户</a></div>
                        <div id="KB2Child" class="child">
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_71_1.shtm" target="forum">软件使用</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_72_1.shtm" target="forum">资源使用</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_74_1.shtm" target="forum">我看软件</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_75_1.shtm" target="forum">寻找软件</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_76_1.shtm" target="forum">行业软件</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_77_1.shtm" target="forum">软件评测</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_81_1.shtm" target="forum">Linux/UNIX</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_82_1.shtm" target="forum">硬件指南</a><br>
                        </div>
                        <div id="KB4Parent" class="parent"> 
    &nbsp;&nbsp;<a href="#" onClick="expandIt('KB4'); return false"><img src="images/i_option.gif" width="20" height="16" border="0">Web开发者</a></div>
                        <div id="KB4Child" class="child">
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_21_1.shtm" target="forum">主页制作</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_22_1.shtm" target="forum">图形处理</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_23_1.shtm" target="forum">ASP</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_24_1.shtm" target="forum">PHP</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_25_1.shtm" target="forum">Perl</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_28_1.shtm" target="forum">JSP</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_27_1.shtm" target="forum">Javascript</a><br>                    </div>
                        <div id="KB5Parent" class="parent"> 
    &nbsp;&nbsp;<a href="#" onClick="expandIt('KB5'); return false"><img src="images/i_option.gif" width="20" height="16" border="0">扩充话题</a></div>
                        <div id="KB5Child" class="child">
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_61_1.shtm" target="forum">程序人生</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_62_1.shtm" target="forum">软件市场</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_67_1.shtm" target="forum">走向海外</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_63_1.shtm" target="forum">程序员考试</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_64_1.shtm" target="forum">人才热线</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_65_1.shtm" target="forum">建议和意见</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_66_1.shtm" target="forum">灌水乐园</a><br>
                        </div>
    &nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="/expert/forum_list/forum_68_1.shtm" target="forum">程序员杂志</a><br>
                        <div id="KB1Parent" class="parent">
    &nbsp;&nbsp;<a href="#" onClick="expandIt('KB1'); return false"><img src="images/i_option.gif" width="20" height="16" border="0">专家榜</a></div>
                        <div id="KB1Child" class="child">
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="topexpert.shtm" target="forum">分类专家榜</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="top50.asp" target="forum">技术专家总榜</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="mtopexpert.shtm" target="forum">技术专家月榜</a><br>
                        </div>
                        <div id="KB6Parent" class="parent">
    &nbsp;&nbsp;<a href="#" onClick="expandIt('KB6'); return false"><img src="images/i_option.gif" width="20" height="16" border="0">系统功能</a></div>
                        <div id="KB6Child" class="child">
    <!-- &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="exchange.asp" target="forum">可用分兑换</a><br> -->
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="forum.asp?room=101" target="forum">最新贴子</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="forum.asp?room=103" target="forum">抢分区</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="forum.asp?room=100" target="forum">我的问题</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="forum.asp?room=104" target="forum">我参与的问题</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="forum.asp?room=105" target="forum">我得分的问题</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="hottopic.asp" target="forum">热点问题</a><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/filebox.gif" width="19" height="13"><a href="register.asp" target="_blank">修改个人注册信息</a><br>
                        </div>
        </td>
      </tr>
      <tr><td height=100 align=center><a href="http://www.csdn.net/expert/zcxy.shtm" target="_blank">CSDN会员登记条款</a><br>  
    <a href="http://www.csdn.net/expert/ltzz.shtm" target="_blank">论坛用户行为准则</a>  
      </td></tr>
      <tr><td>
      </td></tr>
    </table>
    </body></html>
      

  3.   

    http://kms.vicp.net/TreeList/我把演示放在服务器上了,,可以看看
      

  4.   

    linhaibo(美洲豹),帮我发一个可以吗?
    [email protected]
    xie谢谢