Asp+sql How to do the directory tree implementation (infinite pole)

Source: Internet
Author: User

Getobjectbyid ("Timeshow"). InnerHTML = "Load This page is time-consuming" + (new Date (). GetTime ()-t1) + "milliseconds";
}
</SCRIPT>

<body>
<form method= "Get" style= "PADDING:3; Background-color: #B8D1F8; Margin-bottom:0 ">
<fieldset>
<legend> Input tree node parameter information </legend>
Total number of nodes in the tree: <input name= "sum" size= ' 8 ' maxlength= ' 8 ' value= "1024" >
Number of child nodes per node: <input name= "ChildNodes" size= ' 3 ' maxlength= ' 3 ' value= ' >
<input type= "Submit" value= "OK" >
</fieldset>
</form>
<table width= "100%" border=0 cellspacing=3 bgcolor= "#B8D1F8" >
<tr>
&LT;TD Bgcolor=white valign=top>
<div id=treeviewarea style= "Background-color:" ></div>
<script language= "JavaScript" >
<!--
var tree = new Mztreeview ("Tree");
Tree.seticonpath ("./");
tree.nodes[' 0_1 '] = ' Text: Node 1 ';
tree.nodes[' 1_2 '] = ' Text: Node 2 ';
tree.nodes[' 1_3 '] = ' Text: Node 3 ';
tree.nodes[' 1_4 '] = ' Text: node 4 ';
tree.nodes[' 1_5 '] = ' Text: node 5 ';
tree.nodes[' 1_6 '] = ' Text: node 6 ';
tree.nodes[' 1_7 '] = ' Text: node 7 ';
tree.nodes[' 1_8 '] = ' Text: node 8 ';
tree.nodes[' 1_9 '] = ' Text: node 9 ';
tree.nodes[' 1_10 '] = ' Text: node 10 ';
var tot = getquery ("Total"); tot =!tot | | isNaN (TOT)? 1024:tot;
var CNS = getquery ("ChildNodes"); CNS =!cns | | isNaN (CNS)? 10:cns;
With (Document.forms[0])
{
Total.value = tot;
childnodes.value = CNS;
}
for (i=11; i<tot; i++)
Tree.nodes[math.floor (Math.random () * (TOT/CNS)) +2 + "_" + i] = ' Text: node ' + i;



document.getElementById (' Treeviewarea '). InnerHTML = Tree.tostring ();



if (typeof (Function.prototype.apply)!= "Function")
{
Function.prototype.apply = function (obj, Argu) {var s; if (obj) {obj.constructor.prototype._caller=this; s = "Obj._caller ";} else S = "this"; var a=[]; for (var i=0 i<argu.length; i++) a[i] = "argu[" + i + "]"; Return eval (S + "(" + A.join (",") + ");");
Function.prototype.call = function (obj) {var a=[]; for (var i=1; i<arguments.length; i++) a[i-1]=arguments[i]; His.apply (obj, a);};
}
Tree.buildnode = function (ID)
{
var d = new Date (). GetTime ();

MzTreeView.prototype.buildNode.call (this, id);

try{
Getobjectbyid ("Timenode"). InnerHTML = "<u><b>" + This.node[id].text + "</b></u> have" +
This.node[id].childnodes.length + "Child node <br> load time consuming:" + (New Date (). GetTime ()-D) + milliseconds! ";
}catch (e) {}
}
Tree.expandall = function ()
{
var d = new Date (). GetTime ();
MzTreeView.prototype.expandAll.call (this);
Alert ("Expand All time =" + (new Date (). GetTime ()-D) +
Milliseconds \ r \ n The total number of valid nodes = "+ (this.index+1));"
}
-->
</SCRIPT>
&LT;/TD&GT;&LT;TD width= "230" valign=top>
<u><a href= "http://www.meizz.com/Web/Article.asp?id=436"target=" _blank > Use instructions </a></u><br>
<u><a href= "Http://www.meizz.com/Web/Download/MzTreeView10.rar"target=" _blank "> Download mztreevew v1.0</a></u><br><br>
Focus on the <input id=focusid size=5> node <input type=button value= "Gather onclick=" Tree.focus (' Getobjectbyid '). Value) "><br>
<input Type=button value= "Parent layer node ←" onclick= "Tree.uppernode ()" ><input Type=button value= "Child layer node →" onClick= " Tree.lowernode () "><br>
<input Type=button value= "Previous node ↑ onclick=" Tree.pervnode () "><input Type=button value=" Next node ↓ "onClick=" Tree.nextnode () "><br>
<input Type=button value= Expand All Nodes onclick= "Tree.expandall ()" ><br>
<br><ul style= "line-height:14pt" >
<li Id=msgnode >1024 a tree of nodes!
<li id= "timeshow" style= "color: #0000D0" > Here you can see how time-consuming each node loads
<li id= "Timenode" >
</ul></td>
</tr>
</table>
</body>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.