作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我想从 jsTree 获取所有叶节点(节点的 ID 和文本)?
我没有使用复选框 ui:jsTree。
Root
-----A
-----A1
-----A1.1
-----A2
-----A2.1
-----B
-----B2
-----C
-----C1
-----C1.1
我想要来自 jsTree 的叶节点列表。
预期输出:[A1.1、A2.1、B2、C1.1]
如有任何帮助或指导,我们将不胜感激。
最佳答案
是这样的吗?
$('.jstree-leaf').each(function(){
var id = $(this).attr('id');
var text = $(this).children('a').text();
});
关于javascript - jsTree : How to get all leaf nodes from jstree?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10293869/
我是一名优秀的程序员,十分优秀!