bootstrap table 分页,客户端分页
2016-08-26 13:02
501 查看
jsp
<div class="tab-pane fade " id="regeist">
<table id="mytable" data-toggle="table"
data-url="" data-height=""
data-click-to-select="true" data-method="get"
data-query-params="queryParams" data-toolbar="#toolbar"
data-pagination="true" data-search="true" data-show-refresh="true"
data-show-toggle="true" data-show-columns="true" data-page-size="5">
</table>
<table id="mytable" data-toggle="table"
data-url="" data-height=""
data-click-to-select="true" data-method="get"
data-query-params="queryParams" data-toolbar="#toolbar"
data-pagination="true" data-search="true" data-show-refresh="true"
data-show-toggle="true" data-show-columns="true" data-page-size="5">
</table>
</div>
js
$('#mytable').bootstrapTable({
url: 'admin/regeistMessage',
columns: [
{
field: 'state',
checkbox: true,
},{
field: 'id',
title: '序号'
}, {
field: 'name',
title: '姓名'
}, {
field: 'qq',
title: 'qq'
}, {
field: 'phone',
title: 'phone'
},{
field: 'temp',
title: '状态',
align: 'center',
formatter:function(value,row,index){
var temp;
if(row.temp>0){
temp ='已批准';
}else{
temp= '未批准';
}
return temp;
}
},{
title: '操作',
field: 'temp',
align: 'center',
formatter:function(value,row,index){
var temp;
if(row.temp>0){
temp = '<a href="#" mce_href="#" onclick="sc(\''+ row.id +'\')">删除</a> ';
}else{
temp= '<a href="#" mce_href="#" onclick="pz(\''+ row.id + '\')">批准</a> ';
}
return temp;
}
}
]
});
<div class="tab-pane fade " id="regeist">
<table id="mytable" data-toggle="table"
data-url="" data-height=""
data-click-to-select="true" data-method="get"
data-query-params="queryParams" data-toolbar="#toolbar"
data-pagination="true" data-search="true" data-show-refresh="true"
data-show-toggle="true" data-show-columns="true" data-page-size="5">
</table>
<table id="mytable" data-toggle="table"
data-url="" data-height=""
data-click-to-select="true" data-method="get"
data-query-params="queryParams" data-toolbar="#toolbar"
data-pagination="true" data-search="true" data-show-refresh="true"
data-show-toggle="true" data-show-columns="true" data-page-size="5">
</table>
</div>
js
$('#mytable').bootstrapTable({
url: 'admin/regeistMessage',
columns: [
{
field: 'state',
checkbox: true,
},{
field: 'id',
title: '序号'
}, {
field: 'name',
title: '姓名'
}, {
field: 'qq',
title: 'qq'
}, {
field: 'phone',
title: 'phone'
},{
field: 'temp',
title: '状态',
align: 'center',
formatter:function(value,row,index){
var temp;
if(row.temp>0){
temp ='已批准';
}else{
temp= '未批准';
}
return temp;
}
},{
title: '操作',
field: 'temp',
align: 'center',
formatter:function(value,row,index){
var temp;
if(row.temp>0){
temp = '<a href="#" mce_href="#" onclick="sc(\''+ row.id +'\')">删除</a> ';
}else{
temp= '<a href="#" mce_href="#" onclick="pz(\''+ row.id + '\')">批准</a> ';
}
return temp;
}
}
]
});
相关文章推荐
- bootstrap-table表格客户端分页实例
- BootStrap-table 客户端分页和服务端分页的区别
- Bootstrap插件系列——Bootstrap-table初始化、分页、客户端搜索、服务端搜索
- bootstrap table使用(上)——客户端分页
- bootstrapTable--2.客户端分页
- bootstrap table表格客户端分页实例
- 简述bootstrap 之间版本的区别。以及结合springmvc 生成table 分页,传参
- bootstrapTable后台完分页请求数据格式的问题
- bootstrap-table插件实现ajax服务端分页显示
- SSH和BootStrap-table分页
- bootstrap-table分页插件使用
- bootstrap table插件的分页与checkbox使用详解
- bootstrap table 服务器分页
- BootStrap Table实现server分页序号连续显示功能(当前页从上一页的结束序号开始)
- 基于bootstrap table分页数据及行内编辑和导出数据(二)导出数据
- bootstraptable 分页查询 及 条件查询
- bootstrap-table数据循环以及分页
- Bootstrap-table插件先分页再搜索
- Bootstrap table两种分页示例
- BootStrap中的table实现数据填充与分页应用小结