BootstrapTable中使用CheckBox,添加checkbox列即可:
columns: [{
checkbox: true
},
checkbox: 默认为false,不显示,为true时显示。
获取所以选中的列:
var ids = "";
var rows = $('#table').bootstrapTable('getSelections');
if (rows.length == 0) {
layer.alert("请选择需要删除的记录");
return;
} else {
$(rows).each(function () {
ids += this.Id + ',';
});}