zoukankan      html  css  js  c++  java
  • paginate

    
    
    <div style="position:relative;margin:10px 0px;">
                               <div style="box-sizing:border-box;overflow: hidden;float:right;">
                                <div id="mainBusisPage"></div>
                            </div>
                            <div id="fourPage" style="box-sizing:border-box;overflow: hidden;float:right;">
                                <div class="pagegg"><span id="mainBusisTotalNuber" class="few">总条数: <em class="pageNum"></em></span><span id="mainBusisTotalPage" class="few">总页数:  <em class="pageNum"></em></span></div>
                            </div>
                        </div>
    
    
    #mainBusisPage{
        box-sizing: border-box;
        display:none;
        
        margin-right: 66px;
    function mainBusisPaginate(totalCount, pageSize) {
        
        if(totalCount==0) {
            var table = $('#mainBusisTable').DataTable( {
                "destroy":true,
                  "retrieve":true
    
            } );
    
        }
    
        if($("#mainBusisPage").children().length > 0) {
            return true;
        }
        var pageCount = 1;
        var displayPageSize = pageSize;
        
        if(totalCount==0){
            $("#mainBusisPage").css("display","none");
        }
        if(totalCount>=1&&totalCount<=pageSize){
            $("#mainBusisPage").css("display","block");
            displayPageSize = 1;
        }
        if(totalCount> pageSize){
            $("#mainBusisPage").css("display","block");
            pageCount=Math.ceil(totalCount/pageSize);
            if(pageCount < pageSize) {
                displayPageSize = pageCount;
            }
        }
        $("#mainBusisPage").paginate({
            count:pageCount,
            start:1,
            display: displayPageSize,
            border: true,
            border_color: "#00c1de",
            text_color: "#000",
            background_color: "#fff",
            border_hover_color: "#00c1de",
            text_hover_color: "#fff",//设置鼠标滑向页码时页码的颜色。
            background_hover_color: "#00c1de",//设置鼠标滑向页码时页码背景的颜色。
            images: false,
            mouse: 'slide',
            onChange: function(current){
                
    
                //dosomething
            }
        }) ;
    }
  • 相关阅读:
    Study Plan The TwentySecond Day
    Study Plan The Nineteenth Day
    Study Plan The TwentySeventh Day
    Study Plan The Twentieth Day
    Study Plan The TwentyFirst Day
    python实现进程的三种方式及其区别
    yum makecache
    JSONPath 表达式的使用
    oracle执行cmd的实现方法
    php daodb插入、更新与删除数据
  • 原文地址:https://www.cnblogs.com/zjpzjp/p/7575782.html
Copyright © 2011-2022 走看看