bootstrap table + spring + springmvc + mybatis 实现从前端到后端的表格分页

1.使用准备

前台需要的资源文件,主要有Bootstrap3相关css、js以及bootstrap Table相关css、js:

<-- 样式 -->
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="bootstrap-table.css">

<script src="jquery.min.js"></script>
<script src="bootstrap.min.js"></script>
<script src="bootstrap-table.js"></script>
<-- 表格汉化js -->
<script src="bootstrap-table-zh-CN.js"></script>
 

以上这些插件可以到这里下载http://bootstrap-table.wenzhixin.net.cn/zh-cn/getting-started/ (官方文档地址)。


2.使用方法

对于bootstrap table 可以通过data 属性或者javascript 来启用bootstrap table 插件,显示丰富的功能。

这里推荐使用javascript来启用bootstrap table插件来使用bootstrap table,可以实现js和html的分离,代码可以重用,下面我介绍的时候也只介绍这种方法。


3.前端代码

页面代码:

<-- 以下是一些需要的css、js -->
<-- 样式 -->
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="bootstrap-table.css">

<script src="jquery.min.js"></script>
<script src="b
  • 5
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 12
    评论
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值