javascript分页-创新互联

func

创新互联公司为您提适合企业的网站设计 让您的网站在搜索引擎具有高度排名,让您的网站具备超强的网络竞争力!结合企业自身,进行网站设计及把握,最后结合企业文化和具体宗旨等,才能创作出一份性化解决方案。从网站策划到成都做网站、成都网站设计, 我们的网页设计师为您提供的解决方案。tion f_showPage() {
      var pageHtml = '';

      if (currentGroup > 0) {
         pageHtml = pageHtml
               + "<a href='javascript:gridMainPreGroup()'>&lt;&lt</a> ";
      }
      else
     {
         pageHtml = pageHtml
         + "<a>&lt;&lt</a> ";
     }
      if (currentPage > 1) {
         pageHtml = pageHtml
               + "<a href='javascript:gridMainPrePage()'>&lt</a>"
      }
      else
        {
            pageHtml = pageHtml
            + "<a>&lt</a> ";
        }

      var pageNum = currentGroup * 9 + 1;

      for ( var i = 0; i < 9; i++) {

            if (pageNum == currentPage) {
               pageHtml = pageHtml
                     + "<a class="current" href='javascript:gridMainChangePage("
                     + pageNum + ")'>" + pageNum + "</a>"
            } else {
               pageHtml = pageHtml
                     + "<a href='javascript:gridMainChangePage("
                     + pageNum + ")'>" + pageNum + "</a>"
            }

         pageNum++;

      }

         pageHtml = pageHtml
               + "<a href='javascript:gridMainNextPage()'>&gt;</a>"

         pageHtml = pageHtml
               + "<a href='javascript:gridMainNextGroup()'>&gt;&gt;</a>"

      $("#page").html(pageHtml);

   }

   function f_showBadPage() {
      var pageHtml = '';

         pageHtml = pageHtml
         + "<a>&lt;&lt</a> ";

         pageHtml = pageHtml
            + "<a>&lt</a> ";

      var pageNum = currentGroup * 9 + 1;

      for ( var i = 0; i < 9; i++) {

            if (pageNum == currentPage) {
               pageHtml = pageHtml
                     + "<a class="current">" + pageNum + "</a>"
            } else {
               pageHtml = pageHtml
                     + "<a>" + pageNum + "</a>"
            }

         pageNum++;

      }

         pageHtml = pageHtml
               + "<a>&gt;</a>"

         pageHtml = pageHtml
               + "<a>&gt;&gt;</a>"

      $("#page").html(pageHtml);

   }

   function gridMainPreGroup() {
      if(currentGroup > 0)
      {
         lastGroup = currentGroup;
         lastPage = currentPage;
         currentGroup = currentGroup - 1;
         currentPage = currentGroup * 9 + 1;
      }
      f_showBadPage();
      var parms = gridMain.get('parms');
      parms.page = currentPage;
      parms.pagesize = 30;
      gridMain.set('parms', parms);
      gridMain.loadData();

   }

   function gridMainPrePage() {
      lastGroup = currentGroup;
      lastPage = currentPage;
      currentPage = currentPage - 1;
      if (currentPage < currentGroup * 9 + 1) {
         if (currentGroup > 0) {
            currentGroup = currentGroup - 1;
         }
      }
      f_showBadPage();
      var parms = gridMain.get('parms');
      parms.page = currentPage;
      parms.pagesize = 30;
      gridMain.set('parms', parms);
      gridMain.loadData();
   }

   function gridMainChangePage(page) {
      lastGroup = currentGroup;
      lastPage = currentPage;
      currentPage = page;
      f_showBadPage();
      var parms = gridMain.get('parms');
      parms.page = currentPage;
      parms.pagesize = 30;
      gridMain.set('parms', parms);
      gridMain.loadData();
   }

   function gridMainNextGroup() {
      lastGroup = currentGroup;
      lastPage = currentPage;
      currentGroup = currentGroup + 1;
      currentPage = currentGroup * 9 + 1;
      f_showBadPage();
      var parms = gridMain.get('parms');
      parms.page = currentPage;
      parms.pagesize = 30;
      gridMain.set('parms', parms);
      gridMain.loadData();
   }

   function gridMainNextPage() {
      lastGroup = currentGroup;
      lastPage = currentPage;
      currentPage = currentPage + 1;
      if (currentPage > currentGroup * 9 + 9) {
         currentGroup = currentGroup + 1;
      }
      f_showBadPage();
      var parms = gridMain.get('parms');
      parms.page = currentPage;
      parms.pagesize = 30;
      gridMain.set('parms', parms);
      gridMain.loadData();

   }javascript分页

网页名称:javascript分页-创新互联
本文链接:https://www.cdcxhl.com/article42/ihcec.html

成都网站建设公司_创新互联,为您提供营销型网站建设网站维护定制开发标签优化网站设计公司App设计

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

网站托管运营