About the issue of the JavaScript tree structure

zhaozj2021-02-16  53

Function Branch (ID, Text) {this.id = ID; this.text = text; this.write = writebranch; this.add = addleaf; this.leaves = new array (); this.getid = getId;} function getID () {Return this.id;}

Function addleaf (leaf) {this.leaves [this.Leaves.Length] = Leaf;

Function Writebranch () {var branchstring = '

// The time when compiled this.getid () must give a problem with a variable, that is, the left value

Ask for advice! ! ! ! ! ! ! ! BranchString = '> ' this.text; branchstring = ''; branchstring = '

转载请注明原文地址:https://www.9cbs.com/read-23984.html

New Post(0)