前端分页插件twbsPagination的使用

1.引入jquery与twbsPagination

引入js

2.引入div,展示分页效果

        <%--分页--%>
        
            
    div效果展示

    3.script中引入函数

            //分页
            $('#pagination-demo').twbsPagination({
                //total总记录数,就是多少条数据  pages总页数
                totalPages: ${page.total},
                visiblePages: 5,
                first:'首页',
                last:'末页',
                prev:'上一页',
                next:'下一页',
                href:"?p={{number}}"
            });
    

    最终才会展示这种效果:


    page.png

    你可能感兴趣的:(前端分页插件twbsPagination的使用)