layui 复选框全选

"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');
 });

你可能感兴趣的:(layui,layui)