javascript分页-创新互联

func

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

      if (currentGroup > 0) {
         pageHtml = pageHtml
               + "<< ";
      }
      else
     {
         pageHtml = pageHtml
         + "<< ";
     }
      if (currentPage > 1) {
         pageHtml = pageHtml
               + "<"
      }
      else
        {
            pageHtml = pageHtml
            + "< ";
        }

      var pageNum = currentGroup * 9 + 1;

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

            if (pageNum == currentPage) {
               pageHtml = pageHtml
                     + "" + pageNum + ""
            } else {
               pageHtml = pageHtml
                     + "" + pageNum + ""
            }

         pageNum++;

      }

         pageHtml = pageHtml
               + ">"

         pageHtml = pageHtml
               + ">>"

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

   }

   function f_showBadPage() {
      var pageHtml = '';

         pageHtml = pageHtml
         + "<< ";

         pageHtml = pageHtml
            + "< ";

      var pageNum = currentGroup * 9 + 1;

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

            if (pageNum == currentPage) {
               pageHtml = pageHtml
                     + "" + pageNum + ""
            } else {
               pageHtml = pageHtml
                     + "" + pageNum + ""
            }

         pageNum++;

      }

         pageHtml = pageHtml
               + ">"

         pageHtml = pageHtml
               + ">>"

      $("#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分页-创新互联
转载注明:http://bzwzjz.com/article/ihcec.html

其他资讯

Copyright © 2007-2020 广东宝晨空调科技有限公司 All Rights Reserved 粤ICP备2022107769号
友情链接: 成都网站设计 梓潼网站设计 成都网站建设 定制网站设计 专业网站设计 成都网站设计制作公司 成都网站设计公司 网站制作 成都网站设计 网站建设 成都网站建设公司 成都响应式网站建设 网站制作报价 成都网站建设 成都网站设计 网站建设改版 定制网站设计 高端网站建设 移动手机网站制作 成都网站建设 成都网站建设公司 网站制作公司