$("#cb1").prop("checked",true); //很简单就不说了哦
$("#cb1").prop({checked:true}); //map键值对
//1.0 实现全选和不选
$("#checkall").click(function () {
if ($("#checkall").prop("checked") == true) {
$("input[name='ids']").attr("checked",true);
} else {
$("input[name='ids']").attr("checked", false);
}
});