//实现checkbook的全选$('#select_all').click(function(){ if($('#select_all').is(':checked')){ $("input[name='newId']").attr("checked",true); }else{ $("input[name='newId']").attr("checked",false); }});