// checkBox全选/反选
$("#allChk").click(function() {
if(this.checked) {
$("input[name='chk']").prop("checked", true);
$("input[name='chk']").parent().parent().parent().addClass("select");
} else {
$("input[name='chk']").prop("checked", false);
$("input[name='chk']").parent().parent().parent().removeClass("select");
}
});
//获取所选id
function getCheckVal() {
var idsArray = new Array();
$.each($("input[name='chk']"), function() {
if(this.checked) {
var id = $(this).val();
idsArray.push(id);
}
});
return idsArray;