tree.insertNewChild(0,1,"New Node 1",0,0,0,0,"SELECT,CALL,TOP,CHILD,CHECKED");
官方解释:
- Adding Child Node
- Method insertNewChild() allows to add a new child item for the chosen tree node. The parameters the user should indicate are:
- parentId - id of the parent item in which the new child will be created;
- itemId - id of the new item;
- label - text of the new item;
- action - 0 in most cases, but can be a custom function;
- imageClosed - image for a collapsed item; if 0 is indicated - the default one is used;
- imageOpen - image for an expanded item; if 0 is indicated - the default one is used;
- imageLeaf - image for a leaf item; if 0 is indicated - the default one is used;
- additional options - a comma delimited string of the following possible values (upper case only):
- SELECT - move selection to this item after its creation;
- CALL - call a function on item's select;
- TOP - add this item to the top position;
- CHILD - the node contains child items;
- CHECKED - the checkbox is checked (if exists). 大神们,求解啊!!!!