Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
大家好,我刚开始使用 jsTree,我有一个问题要问你们。我怎样才能只选择最嵌套的节点 - 没有任何子节点的节点。另外,当这个节点被选中时,我想提交包含 jsTree 的表单。我如何才能访问选定的节点?
使用 jQuery 获取节点可能更容易:
myTree.find('li').has(':not(ul)');