bootstrap table selectsingle
2017-09-28 13:43
288 查看
<!DOCTYPE html> | |
| <html> |
| <head> |
| <title>getSelections</title> |
| <meta charset="utf-8"> |
| <link rel="stylesheet" href="../assets/bootstrap/css/bootstrap.min.css"> |
| <link rel="stylesheet" href="../assets/bootstrap-table/src/bootstrap-table.css"> |
| <link rel="stylesheet" href="../assets/examples.css"> |
| <script src="../assets/jquery.min.js"></script> |
| <script src="../assets/bootstrap/js/bootstrap.min.js"></script> |
| <script src="../assets/bootstrap-table/src 4000 /bootstrap-table.js"></script> |
| <script src="../ga.js"></script> |
| </head> |
| <body> |
| <div class="container"> |
| <h1>getSelections</h1> |
| <p>Return all selected rows, when no record selected, am empty array will return: <code>$table.bootstrapTable('getSelections');</code></p> |
| <div id="toolbar"> |
| <button id="button" class="btn btn-default">getSelections</button> |
| </div> |
| <table id="table" |
| data-toggle="table" |
| data-toolbar="#toolbar" |
| data-height="460" |
| data-click-to-select="true" |
| data-url="../json/data1.json"> |
| <thead> |
| <tr> |
| <th data-field="state" data-checkbox="true"></th> |
| <th data-field="id">ID</th> |
| <th data-field="name">Item Name</th> |
| <th data-field="price">Item Price</th> |
| </tr> |
| </thead> |
| </table> |
| </div> |
| <script> |
| var $table = $('#table'), |
| $button = $('#button'); |
| |
| $(function () { |
| $button.click(function () { |
| alert('getSelections: ' + JSON.stringify($table.bootstrapTable('getSelections'))); |
| }); |
| }); |
| </script> |
| </body> |
| </html> |
相关文章推荐
- bootstrap-table 中columns中editable type为select默认使用本列数据
- bootstrap table x-editable select2——带图标的选择
- bootstrapTable editable select empty
- bootstrap-table出现多个表头问题解决
- 基于bootstrap table分页数据及行内编辑和导出数据(二)导出数据
- create table tb as select 和create table tb like的区别
- JS组件系列——表格组件神器:bootstrap table
- [译]bootstrap-select (selectpicker)方法
- bootstrap table笔记
- bootstrap-table 分页
- 使用bootstrap-select完成可搜索的多选下拉列表
- dul无法加载bootstrap实现unload table/user恢复问题详解
- bootstrap固定table表头
- 值得分享的bootstrap table实例
- Bootstrap 3之美05-排版、Button、Icon、Nav和NavBar、List、Table、Form
- JS表格组件神器bootstrap table使用指南详解
- hive基本的操作语句(实例简单易懂,create table XX as select XX)
- create table xxx as select 与 create table xxx like
- bootstrapTable服务器分页
- SelectSingleNode和SelectNodes区别