【发布时间】:2012-05-05 00:01:39
【问题描述】:
如何获取 jsTree 中存在的所有节点?
我正在用 xml 构建 jsTree
Root
-----A
-----A1
-----A1.1
-----A1.2
-----A2
-----`A2.1`
-----A2.2
-----B
-----B1
-----B2
-----C
-----C1
-----C1.1
-----C2.2
我想要jsTree中存在的所有节点(ID)的数组如下
预期输出:[根,A,A1,A1.1,A1.2,A2,A2.1,A2.2,B,B1,B2,C,C1,C1.1,C2。 2]
【问题讨论】:
-
请在jstree jquery how to iterate through all nodes查看我的回答。它可以帮助解决这个问题。
标签: javascript jquery jquery-plugins jquery-selectors jstree