????: //全選,取消全選 $(document).on("click","#selection",function(){ &nb
//全選,取消全選
$(document).on("click","#selection",function(){
if($(this).hasClass("selected")==false){
$(this).closest(".tablesWrap").find("input[type=checkbox]").prop("checked",true);
$(this).addClass("selected");
}else{
$(this).closest(".tablesWrap").find("input[type=checkbox]").prop("checked",false);
$(this).removeClass("selected");
}
});
?? ???:天蓬老師?? ??:2019-04-14 21:51:18
???? ??:"selected")==false, 以后像這樣的判斷, 推薦全部使用三個等號, 以避免發(fā)生類似自動轉換