//全选框 <input type="checkbox" οnclick="CheckAll(this.checked)"/>
//选择框<input name="check" type="checkbox" value="{{$v->id}}" οnclick="_checks(this);"/>
/**全选*/ function CheckAll(val) { if(val == false) { $("#counts").html(" " +0+" " ); $("input[name='check']").attr('checked',false); return; } var j=0; var num = parseInt($( "#num" ).val()); $("input[name='check']").each(function() { j++; if( j > num ) { return; }else { this.checked = val; } $("#counts").html(" " +j+" " ); }); } </script>