zTreeObj.getChangeCheckedNodes.html 1.2 KB

123456789101112131415161718192021222324
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function()</span><span class="path">zTreeObj.</span>getChangeCheckedNodes</h2>
  4. <h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
  5. <div class="desc">
  6. <p></p>
  7. <div class="longdesc">
  8. <p>获取输入框勾选状态被改变的节点集合(与原始数据 checkedOld 对比)。<span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
  9. <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
  10. </div>
  11. </div>
  12. <h3>Function 参数说明</h3>
  13. <div class="desc">
  14. <h4><b>返回值</b><span>Array(JSON)</span></h4>
  15. <p>返回全部勾选状态被改变的节点集合 Array</p>
  16. <p class="highlight_red">如果需要获取每次操作后全部被改变勾选状态的节点数据,请在每次勾选操作后,遍历所有被改变勾选状态的节点数据,让其 checkedOld = checked 就可以了。</p>
  17. </div>
  18. <h3>function 举例</h3>
  19. <h4>1. 获取当前勾选状态被改变的节点集合</h4>
  20. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  21. var nodes = treeObj.getChangeCheckedNodes();
  22. </code></pre>
  23. </div>
  24. </div>