BootstrapTable usage tips

1. How to remove table content

$('#tb_history_alarms').bootstrapTable('remove',{
  field:'viewId',
  values: [parseInt(viewId)]

})

2. How to add table content

for(var j = 0; j < zTreeDoorData.length; j++) {
var dataTree2 = zTreeDoorData[j];
$('#tb_history_alarms5').bootstrapTable('append', dataTree2);

}

3. The method of overloading the table content

$('#tb_history_alarms').bootstrapTable('load',rowx);

4. How to get a single row of data

var selectContent = $("#view").bootstrapTable('getSelections')[0];

5. How to get multiple rows of data

var allTableData = $tableLeft.bootstrapTable('getData'); // Get all content rows of the table

6. How to get the data of the selected row

var a= $table.bootstrapTable('getSelections');

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324975989&siteId=291194637