zoukankan      html  css  js  c++  java
  • layui 工具条实现分页

    1.页面 
    <div id="getShowTable" style=" 100%; height: auto;clear: both;"></div>
    2.js
    //请求后台返回页面
    function lodPage(page, limit,key) {
            //请求数据
            $.ajax({
                type: "post",
                url: gContextPath + "/wantReturnBid/wantReturnBidList.htm",
                data: {
                    "page": page, "limit": limit,"key":key
                },
                dataType: "html",
                success: function (data) {
                    $("#getShowTable").html(data);
                }
            });
    }
    3.请求返回的页面加
    //分页工具条
    <div id="page_dv" style="text-align: center;"></div>    
    //js
     layui.use(['laypage', 'layer'], function () {
            var laypage = layui.laypage
                , layer = layui.layer;
            var current =${page.count};
            //分页
            laypage.render({
                elem: 'page_dv'
                , count: current //数据总数
                , curr: '${page.page}'
                , limit: 10
                , groups: 10
                , layout: ['count', 'prev', 'page', 'next', 'refresh', 'skip']
                , jump: function (obj, first) {
                    if (!first) {
                        var key = $(".js_invite_serach_key").val()||"";
                        lodPage(obj.curr, obj.limit,key);
                    }
                }
            });
    
            //回标
            $(document).on("click",".js_return_bid",function(){
                var _th = $(this);
                var _rel = _th.attr("rel");
                window.location.href=gContextPath+"/wantReturnBid/wantReturnBidEdit.htm?planId="+_rel;
            });
    
        })
  • 相关阅读:
    博客园项目
    social-auth-app-django模块
    win10安装软件被阻止后
    expdp和impdp的用法
    EXPDP
    oracle常用的数据迁移方法
    使用spool导出数据
    无法创建spool文件
    sqlldr导入数据
    cmd 登录oracle
  • 原文地址:https://www.cnblogs.com/tangbang/p/10121081.html
Copyright © 2011-2022 走看看