layui 复选框全选

<input type="checkbox" name="all" title="全选" lay-filter="allChoose">

            //复选框全选
 form.on('checkbox(allChoose)',function (data) {
     var child = $(':checkbox[name!="all"]');

     child.each(function(index, item){
         item.checked = data.elem.checked;
     });
     form.render('checkbox');
 });

猜你喜欢

转载自blog.csdn.net/qq_38083665/article/details/81945785