bootstrap table 获取选择信息
<buttonid="button"type='button'class="btnbtn-primary">导入</button><tableid="table"data...
<button id="button" type='button' class="btn btn-primary" >导入</button>
<table id="table" data-toggle="table" data-url="stdwaitforselectempjson" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-search="true" data-select-item-name="toolbar1" data-pagination="true" data-sort-name="name" data-sort-order="desc">
<thead>
<tr>
<th id="getSelections" data-field="SYSID" data-checkbox="true" >ID</th>
<th data-field="badgeid" data-sortable="true">工号</th>
<th data-field="cname" data-sortable="true">姓名</th>
<th data-field="deptname" data-sortable="true">部门</th>
</tr>
</thead>
</table>
<script>
$button.click(function () {
alert("hi");
var ids = $.map($table.bootstrapTable('getSelections'), function (row) {
return row.id;
});
})
</script>
点击button,没有反应,求高手帮忙释疑~ 展开
<table id="table" data-toggle="table" data-url="stdwaitforselectempjson" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-search="true" data-select-item-name="toolbar1" data-pagination="true" data-sort-name="name" data-sort-order="desc">
<thead>
<tr>
<th id="getSelections" data-field="SYSID" data-checkbox="true" >ID</th>
<th data-field="badgeid" data-sortable="true">工号</th>
<th data-field="cname" data-sortable="true">姓名</th>
<th data-field="deptname" data-sortable="true">部门</th>
</tr>
</thead>
</table>
<script>
$button.click(function () {
alert("hi");
var ids = $.map($table.bootstrapTable('getSelections'), function (row) {
return row.id;
});
})
</script>
点击button,没有反应,求高手帮忙释疑~ 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询