Home >Web Front-end >Bootstrap Tutorial >How to get row data in bootstrap?

How to get row data in bootstrap?

青灯夜游
青灯夜游forward
2020-12-10 18:01:013853browse

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+",";
          }
      }

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

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

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete