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);