How to get row data in bootstrap?

青灯夜游
Release: 2021-01-08 14:36:36
forward
3788 people have browsed it

How to get row data in bootstrap?

Recommended related tutorials: "bootstrap tutorial"

bootstrap's method of obtaining row data

1. Get the data of the selected row

var rows = $('#dataTable').bootstrapTable('getData');
//行的数据
      var ids = "";
      for(var i=0;i<rows.length;i++){
          if(rows[i].check){
              ids += rows[i].id+",";
          }
      }
Copy after login

2. Get the data of the row based on the id

uniqueId : id,//设置唯一的标识,要先设置唯一键
var rows = $(&#39;#dataTable&#39;).bootstrapTable(&#39;getRowByUniqueId&#39;,id);//行的数据
Copy after login

For more programming-related knowledge, please visit: Programming Learning Course! !

The above is the detailed content of How to get row data in bootstrap?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template