亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

layui-table表復選框勾選的所有行數(shù)據(jù)獲取的例子

 更新時間:2019年09月13日 14:04:57   作者:繾綣つ  
今天小編就為大家分享一篇layui-table表復選框勾選的所有行數(shù)據(jù)獲取的例子,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

項目需求,可以用復選框勾選項目進行提交,如下表

<table class="layui-table" lay-data="{url:'******', id:'test3'}" lay-filter="test3">

  <thead>
  <tr>
    <th lay-data="{type:'checkbox'}">ID</th>
    <th lay-data="{field:'id', width:80}">ID</th>
    <th lay-data="{field:'t1'}">測試項</th>
    <th lay-data="{field:'t2', edit: 'text'}">標定參數(shù)</th>
    <th lay-data="{field:'t3'}">標定值</th>
  </tr>
  </thead>
</table>

我們已經(jīng)獲取到了表中所有行的數(shù)據(jù),全選,部分選都可行,不用選復選框遍歷的方式去獲取數(shù)據(jù)

table.on('checkbox(test3)', function(obj){
      var checkStatus = table.checkStatus('test3');
      console.log(checkStatus.data)//選中行數(shù)據(jù)
      console.log(checkStatus.data.length)
      
      })
      
$('.ttes').click(function () {
      var index = parent.layer.getFrameIndex(window.name);
      var checkStatus = table.checkStatus('test3');
      console.log(checkStatus.data)//選中行數(shù)據(jù)
      var items = checkStatus.data;

以上這篇layui-table表復選框勾選的所有行數(shù)據(jù)獲取的例子就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關文章

最新評論