前些时无聊,用javascript写的一颗树[3]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 zbjg 的 blog

    {
       if(nodelist(i).id.substring(0,12) == 'tree_parent_' && nodelist(i).value == parentid)
       {
           tempnode = document.getelementbyid('tree_path_' + nodelist(i).id.substring(12,nodelist(i).id.length));
           tempnode.value = tempparent.value + ',' + nodelist(i).id.substring(12,nodelist(i).id.length);
          
           updatenode(nodelist(i).id.substring(12,nodelist(i).id.length));
       }
    }
}
</script>
</head>
<body>
<input type=button id="ldsk" value="点击增加节点" onclick="addleaf(0);"><input id="newparent" type=text  value=''>
<input type=button id="ldssk" value="显示选定节点的源码" onclick="getdiv.value = tree_div_0.innerhtml;"><br>
<ul id="tree_div_0" ></ul>  
<br><textarea id="getdiv" cols=80 rows=23></textarea>  
<input id="lsh" type=hidden  value='0'>
</body>

本文关键:前些时无聊,用javascript写的一颗树
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top