复选框全选
var checked = false;
$('#checkAll').click(function() {
checked = !checked;
$('input').prop("checked",checked);
var $subBox = $('#postList').find('input');
$subBox.click(function(){
$("#checkAll").attr("checked",$subBox.length == $("#postList input:checked").length ? true : false);
});
});
获取选中复选框的值
$('#postList').find('input[type="checkbox"]').each(function(){
if($(this).prop('checked')){
idList+=$(this).val()+',';
}
});