csdn上搜索的好象都是固定的,不是用数据库形式的,但假如数据多了就不知怎么办了,可以用xml,javascript,+asp/jsp,但还没有成功,想想办法,一起努力吧

解决方案 »

  1.   

    我要一个,学习学习,[email protected]
    Thanks!
      

  2.   

    15seconds.com英文的,搜索tree。
      

  3.   

    能不能也给我一份?谢谢!!!
    [email protected]
      

  4.   

    我也来个
    mail:[email protected]
      

  5.   

    http://www.fangfa.net/temp/tv102.exeTreeView类,1.02版!
    2.0版制作中
      

  6.   

    我也来个
    [email protected]
    谢谢!
      

  7.   

    me!me! i wanna get some one..
    email:[email protected]
      

  8.   

    <!----#include file="conn.asp"-------><head>
    <link rel="stylesheet" type="text/css" href="style.css"><title>分层</title></head>
    <base target="main.asp">
    <body topmargin="0" leftmargin="0" bgcolor="#7285CF"><table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
      <tr><td height="20"></td></tr>
      <tr>
        <td width="100%" height="281" valign="top">
    <DIV id=cItem> 
    <%
      I=0'取第一层内容
      sql = "Select * from first order by id"
      Set Rs = Conn.Execute(sql)
      if not rs.eof then
        do while not rs.eof
    '判断该记录是否为终结点
         SQL2 = "Select * From second Where fcode='" & Rs("code")  & "' order by id"
     Set Rs2 = Conn.Execute(SQL2)
    %>    
    <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#DEE2F3">
      <tr>
      <%if Rs2.eof then%>
       <td width="5%"><p align="right"><img src="Images/end.gif" align="absbottom" width="9" height="9"></p></td>
       <td width="95%" style="cursor:Hand" valign="top"><a href="main.asp?code=<%=Rs("code")%>" target=main><% = Rs("name") %></a></td>
          <%response.write "</tr></table>"%>
       <%
       else
       %>
       <td width="5%">
          <p align="right"><img src="Images/Close.gif" id="Out1<%=I+1%>" style="cursor:Hand" class=cItem align="absbottom" width="9" height="9"></p>
        </td>
        <td width="95%" id="Out1<%=I+1%>"><% = Rs("name") %></td></tr></table>
      
    <div id="Out1<%=I+1%>a" style="display:None"> 
    <%
    '取第二层内容
        J=0
      do while not Rs2.eof
    '判断该记录是否为终结点
         SQL3 = "Select * From third Where scode='" & Rs2("code")  & "' order by id"
     Set Rs3 = Conn.Execute(SQL3)
    %>    
    <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#DEE2F3">
      <tr>
      <%if Rs3.eof then%>
       <td width="10%"><p align="right"><img src="Images/end.gif" align="absbottom" width="9" height="9"></p></td>
       <td width="90%" style="cursor:Hand"><a href="main.asp?code=<%=Rs2("code")%>" target=main><% = Rs2("name") %></a></td>
          <%response.write "</tr></table>"%>
      <%
      else
      %>
        <td width="10%">
         <p align="right"><img src="Images/Close.gif" id="Out2<%=I%><%=J+1%>" style="cursor:Hand" class=cItem align="absbottom" width="9" height="9"></p>
        </td>
        <td width="95%" id="Out2<%=I%><%=J+1%>"><% = Rs2("name") %></td></tr></table>  
    <div id="Out2<%=I%><%=J+1%>a" style="display:None">
    <%do while not Rs3.eof%>
    <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#DEE2F3">
      <tr>
       <td width="15%"><p align="right"><img src="Images/end.gif" align="absbottom" width="9" height="9"></p></td>
       <td width="85%" style="cursor:Hand"><a href="main.asp?code=<%=Rs3("code")%>" target=main><% = Rs3("name") %></a></td>
      </tr>
    </table>
    <%
      Rs3.movenext
      loop
    %></div>
    <%
       End if
       J=J+1
       Rs2.movenext
       loop
    %>
    </div>
    <%
      end if
      I=I+1
      Rs.movenext
      loop    
     end if
      Conn.Close
    %>
    </div>
      
    <script><!--
    function DynamicFunc()

    var tID, sTAG, tTag; 
    sTAG = window.event.srcElement; 
    if (sTAG.className == "cItem")
    {
       tID = sTAG.id + "a";
       tTag = document.all(tID);
       if (tTag.style.display == "none")
       {
          tTag.style.display = "";
          sTAG.src = "Images/Open.gif";
       }
       else
       {
          tTag.style.display = "none";
          sTAG.src = "Images/Close.gif";
       }
    }
    }
    cItem.onclick = DynamicFunc; 
    //-->
    </script></body>
    </html>
      

  9.   

    <html>
    <body>
    <table>
    <tr><td>1</td><td>树木1</td><tr>
    <tr><td>2</td><td>树木2</td><tr>
    <tr style="cursor:hand;"  ><td  valign=top>3</td><td id="test"><div onclick='opentree()'>树木3</div></td><tr>
    </table>
    </body>
    </html>
    <script language="javascript">
    function opentree()
    {

    document.all.test.innerHTML = "<table><tr><td onclick='javascript:closetree()'>树木3</td><tr><tr><td>1</td><td>叶子</td><tr></table>"
    }
    function closetree()
    {
    document.all.test.innerHTML ="<div onclick='opentree()'>树木3</div>";
    }
    </script>这段代码简单了一点,大致思路就是这样,通过innerHTML代替就可以实现了,当然这是最简单的方法。你可以自己试试看这段代码,我刚写的一棵树也是这么做的!