bootstrapTable
来源:互联网 发布:电脑动画制作软件 编辑:程序博客网 时间:2024/04/30 06:25
bootstrap样式比较好看,现项目中使用,做一下记录,备忘。
引入文件:
<link rel="stylesheet" type="text/css" href="/js/bootstrap/css/bootstrap.min.css" /><link rel="stylesheet" type="text/css" href="/js/bootstrap/css/bootstrap-table.min.css" /><script type="text/javascript" src="/js/jquery/jquery.min.js"></script><script type="text/javascript" src="/js/bootstrap/js/bootstrap.min.js"></script><script type="text/javascript" src="/js/bootstrap/js/bootstrap-table.min.js"></script><script type="text/javascript" src="/js/bootstrap/js/bootstrap-table-zh-CN.js"></script>
html代码
<table id="gravidaTable"> <thead> <tr> <th data-field="id" data-checkbox="true">ID</th> <th data-field="name">姓名</th> <th data-field="phoneNo">手机号</th> <th data-field="dueDate">预产期</th> <th data-field="assess" data-formatter="assessColumn">风险等级</th> <th data-field="infection" data-formatter="infectionColumn">有无传染病</th> </tr> </thead></table>
JS代码
$('#gravidaTable').bootstrapTable({contentType: "application/x-www-form-urlencoded",method: 'post', dataType: "json",url: "/gravida/list",striped: true,pagination: true,singleSelect: false,clickToSelect:true,showColumns: false,search: false, silent: true,pageSize: 10,pageNumber:1,sidePagination: "server",queryParamsType:"limit",pageList:[10, 25, 50, 100],queryParams: gravidaTableParams,onDblClickRow:onDblClickRow});function onDblClickRow(row){$('#myModal').modal('show')}
//表格查询条件function gravidaTableParams(params) { return { pageSize: params.limit, pageNumber: params.pageNumber };}bootstrapTable自定义条件查询。
//风险颜色点击function assessColor(){var color=this.title;$('#gravidaTable').bootstrapTable('refresh',{query:{'assess':color}});}
0 0
- bootstrapTable
- bootstrapTable api
- bootstrapTable 举例
- bootstrapTable Rows
- bootstrapTable mergeCells
- BootstrapTable使用
- bootstrapTable demo
- bootstrapTable跨域问题
- bootstraptable的 showFooter属性
- bootstrapTable服务器分页
- bootstrapTable的参数设置
- bootstrapTable-显示序号
- BootStrapTable 隐藏列
- bootstrapTable excel导出
- bootstrapTable 使用范例
- BootStrapTable 自定义导出
- bootstrapTable 举例2
- bootstraptable刷新数据
- Activity之间使用Intent和Bundle传值的区别
- ios定位
- 多重继承
- SODBASE实时大数据基础(一):实时同步Mysql数据库到Kafka
- 小小ARC造福无数码农
- bootstrapTable
- Xen-Server 6.5 配置 License Management 授权
- 安装fftw
- 一个简单的C语言的汇编程序
- CodeForces 614A. Link/Cut Tree【坑精度!!!】
- Android开发之非Activity类型的Context启动一个目标Activity
- 《剑指Offer》学习笔记——数值的整数次方
- nyoj 73比大小
- Nginx性能优化----系统篇