2

dhtmltree 控件 设置所有节点的图标为同一个图标

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). 大神们,求解啊!!!!
查看全部
u012482647
扫地僧-大白
2016/10/17 10:47
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复