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;
            });
    
        })
  • 相关阅读:
    Pytorch笔记 (2) 初识Pytorch
    Pytorch笔记 (1) 初始神经网络
    c++ 数据抽象 、封装 接口(抽象类)
    c++ 多态
    c++ 重载运算符和重载函数
    c++ 继承
    c++面向对象 —— 类和对象
    c++ 结构
    c++ 基本的输入输出
    c++ 引用 日期&时间
  • 原文地址:https://www.cnblogs.com/tangbang/p/10121081.html
Copyright © 2011-2022 走看看