瑾冰

DataTables-Checkboxes 中的复选框

电脑版发表于:2020/5/15 15:16



在后台左边添加一列复选框如下

随后实现复选框全选全不选中

 //页面上点击此属性,将当前页的列表数据全部选中
 
 $('#select-all').on('click', function () {
   if (this.checked) {
     $('.checkbox_select').each(function () {
        his.checked = true;
      });
     }
     else {
       $('.checkbox_select').each(function () {
     this.checked = false;
    });
   }
 });
//表格页面刷新
      function getMoneyes() {
        dataTable.ajax.reload(null, false);
      }

哈哈哈哈  就到这里希望看到能过够帮助到你  加油

关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢