去ASP版搜索一下,有几个版本哦,有阿信的,还有狼兄的

解决方案 »

  1.   

    http://www.csdn.net/develop/Read_Article.asp?Id=20814
      

  2.   

    有没有PHP的,我想要这样的:开始显示第一层,点击后才读库中的数据,因为我的节点太多了,有两万左右
      

  3.   

    csdn树菜单php+mysql版.rarhttp://goodmm.updays.com/csdn.rarydyd写的.好用的话,你另开贴谢他吧。
      

  4.   

    This is the Postfix program at host qs3.qq.com.I'm sorry to have to inform you that the message returned
    below could not be delivered to one or more destinations.For further assistance, please send mail to <postmaster>If you do so, please include this problem report. You can
    delete your own text from the message returned below. The Postfix program<[email protected]>: host tommx.163.net[202.108.255.210] said: 550 Domain in
        Mail from user is illegal. (in reply to MAIL FROM command)
      

  5.   

    To:hope1983(亢龙有悔浪子回头):有一个问题,每次刷新后都会全部关闭,有没什么办法保持原样?To:feel8(准备早起的鸟):收到了,可这个是一次全部从表中读出数据,对于20000个节点会太慢的.
    我这也有一个,刷新后也是会全部关闭,有没办法?
    <?php include("config.php"); ?><html>
    <head>
    <link rel="StyleSheet" href="cssmb.css" type="text/css" />
    <script language="JavaScript">
    function ShowMenu(MenuID){ 
    if(MenuID.style.display=="none"){ 
    MenuID.style.display=""; 
    }else{
    MenuID.style.display="none";
    }
    }
    </script>
    <style type="text/css">
    <!--
    TD { 
    FONT-FAMILY: "Arial", "Helvetica", "sans-serif"; FONT-SIZE: 12px; LINE-HEIGHT: 130%; letter-spacing:1px 
    } .Menu { 
    COLOR:#000000; FONT-FAMILY: "Arial", "Helvetica", "sans-serif"; FONT-SIZE: 12px; CURSOR: hand 
    } -->
    </style>
    </head>
    <body>
    <?php
    echo "<a href=admin.php target=main>Part Number Admin</a>";$Con=mysql_connect($db_host,$db_user,$db_pwd);
    mysql_select_db($db_name);$sql="select * from part_class order by id";
    $result_class=mysql_query($sql,$Con);while($rs=mysql_fetch_array($result_class)){ $GLOBALS["ID"] =1;
    $layer=1;

    $Con=mysql_connect($db_host,$db_user,$db_pwd);
    mysql_select_db($db_name);

    $sql="select * from part_db where class_id='".$rs["id"]."' and prev_id=0";
    $result=mysql_query($sql,$Con); 

    echo "<br>".$rs["name"];
    if(mysql_num_rows($result)>0){
    ShowTreeMenu($Con,$result,$layer,$ID); 
    }
    }function ShowTreeMenu($Con,$result,$layer){
    $numrows=mysql_num_rows($result);

    echo "<table cellpadding='0' cellspacing='0' border='0'>";

    for($rows=0;$rows<$numrows;$rows++){
    $menu=mysql_fetch_array($result);

    $sql="select * from part_db where prev_id=$menu[id]";
    $result_sub=mysql_query($sql,$Con);

    echo "<tr>";
    if(mysql_num_rows($result_sub)>0){
    echo "<td width='20' class='Menu' onClick='javascript:ShowMenu(Menu".$GLOBALS["ID"].");'><img src='img/folder.gif' border='0'></td>";
    echo "<td><a href='admin.php?id=$menu[id]' target='main'>$menu[part_no][$menu[part_mess]]</a>";
    }else{
    echo "<td width='20'><img src='img/page.gif' border='0'></td>";
    echo "<td>$menu[part_no][$menu[part_mess]]";
    }
    /* if($menu[layer_id]>=3){
    echo "<a href='admin.php?id=$menu[id]' traget='main'>$menu[part_no][$menu[part_mess]]</a>";
    }else{
    echo $menu[part_no]."[".$menu[part_mess]."]";
    }*/
    echo "</td></tr>";

    if(mysql_num_rows($result_sub)>0){
    echo "<tr id=Menu".$GLOBALS["ID"]++." style='display:none'>";
    echo "<td width='20'>&nbsp;</td>";
    echo "<td>";
    $layer++;
    ShowTreeMenu($Con,$result_sub,$layer);
    $layer--;
    echo "</td></tr>";


    echo "</table>";

    ?> 
    </body> 
    </html>
      

  6.   

    To:feel8(准备早起的鸟):我改过了dtree,可以显示第一层,当要打开下一层时却显示"_io为null或不是对象",在416行,可是查看源代码中却没有这一行,请帮忙,分好说....<html><head>
    <title></title><link rel="StyleSheet" href="dtree.css" type="text/css" />
    <link rel="StyleSheet" href="cssmb.css" type="text/css" />
    <script type="text/javascript" src="dtree.js"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div class="dtree"> <p><a href="javascript: d.openAll();">open all</a> | <a href="javascript: d.closeAll();">close all</a></p> <?
    echo "Part Number Admin"; $cm="select * from part_class order by id";
    $result_class=mysql_db_query($db_name,$cm); echo "<script type='text/javascript'>";

    while($rs_class=mysql_fetch_object($result_class)){

    echo "d = new dTree('d');";
    echo "d.add(0,-1,'$rs_class->name');";

    $cm="select * from part_db where class_id='$rs_class->id' order by part_no";
    $result=mysql_db_query($db_name,$cm);
    while($rs=mysql_fetch_object($result)){
    echo "d.add($rs->id,$rs->prev_id,'$rs->part_no($rs->part_mess)','admin.php?id=$rs->id','','main');";
    }
    echo "document.write(d);";

    }
    echo "</script>";
    ?>
    </div></body></html>
      

  7.   

    想要刷新后保持,
    那最好就是用COOKIE或者SESSION,
    不然无状态的HTTP没办法满足你的要求
      

  8.   

    to:jxhj
    csdn的左边菜单不也是刷新后就恢复原样了吗?如果要用COOKIE保持刷新前的菜单哪不是很麻烦?