var id_array = new Array();
$('input:checkbox[name=item]:checked').each(function(){
id_array.push($(this).parents('td').siblings('.planId').attr('id'));//向数组中添加元素
});
此时的id_array 就是所有复选框为选中状态的id
each() 方法规定为每个匹配元素规定运行的函数。