2010-05-12 69 views

回答

0
var result = new Array(); 
$(".jstree-checked").each(function(i, element){ 
    result[i] = $(element).attr("id"); 
}); 
+2

供參考:這將不會返回檢查的項目的兒童。 – 2011-03-03 20:19:35

0
var arr = new Array(); 
var i = 0; 
$('#dtree_region li').filter('.jstree-checked').each(function(){ 
        arr[i] = $.makeArray($(this).attr("id")); 
        // sel_id = sel_id + ',' + $(this).attr("id"); 
         i++; 
         }); 
var sel_id = arr.join(","); 
相關問題