jq对layui复选框操作事件

在用layui的复选框时,如果想进行选中或取消状态,需要用render进行刷新
$("#checkedAll").on("click",function () {
var checked = $("input[name='checkedAll']").is(':checked');
console.log(checked)
if(checked){
$(".checkbox_data").prop("checked",true)
}else{
$(".checkbox_data").prop("checked",false)
}
form?form.render("checkbox") : null;
});



猜你喜欢

转载自www.cnblogs.com/gmsmile/p/10484879.html