- A+
所属分类:Bootstrap Table
Html
- <table id="Table"></table>
JavaScript
省略表格初始化代码
- $('#Table').find('thead input[type=checkbox]').on("click",
- function () {
- if($(this).is(":checked")) {
- $('#Table').bootstrapTable('togglePagination').bootstrapTable('checkAll')
- .bootstrapTable('togglePagination');
- }else {
- $('#Table').bootstrapTable('togglePagination').bootstrapTable('uncheckAll')
- .bootstrapTable('togglePagination');
- }
- });
参考官网例子
- https://bootstrap-table-examples.wenzhixin.net.cn/index.html#issues/1167.html?tdsourcetag=s_pcqq_aiomsg