快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

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://6mz.cn/article/ihcec.html

其他资讯