当前位置: 主机百科 » 资源 » 技术 » 正文

Bootstrap-table获取选中行数据

Bootstrap-table获取选中行数据函数:

1
  function getIdSelections() {      return $.map($table.bootstrapTable('getSelections'), function (row) {          return row.id//返回数据行中的id值      });  }

在需要获取选中行数据的位置调用上述函数即可

1
  var ids = getIdSelections();//返回一个包含所有选中行中id列值的数组

未经允许不得转载:主机百科 » Bootstrap-table获取选中行数据

相关文章