ADOU-V

导航

关于easyui Tree取得选中节点的父级节点(得到选取实心圆点的id)

 1             var nodes = $('#tt').tree('getChecked', 'indeterminate');
 2             var nodes1 = $('#tt').tree('getChecked');
 3             var s = '';
 4             for (var i = 0; i < nodes.length; i++) {
 5                 if (nodes[i].id != 0) {
 6                     if (s != '') s += ',';
 7                     s += nodes[i].id;
 8                 }
 9             }
10             for (var i = 0; i < nodes1.length; i++) {
11                 if (nodes1[i].id != 0) {
12                     if (s != '') s += ',';
13                     s += nodes1[i].id;
14                 }
15             }
16             alert(s);

 

posted on 2016-02-16 10:48  a-dou  阅读(1227)  评论(0编辑  收藏  举报