function printPage(pageTotal) {
   var pagehtml = '';
   var tit;
   if (printDate['pageindex'] == 1) {
      pagehtml += '<p title="已是首页" class="prev_btn nohting_left _Left"><span class="prev_bg"></span></p>';
   } else {
      pagehtml += '<p class="prev_btn _Left"><a href="javascript:goPage(' + (printDate['pageindex'] - 1) + ')"><span class="prev_bg"></span></a></p>';
   }
   pagehtml += '<ul class="pag_box _Left"><div class="pag_wrap">';

   if (printDate['pageindex'] != 1 && printDate['pageindex'] >= 4 && pageTotal != 4) {
      pagehtml += '<li><a href="javascript:goPage(1)">1</a></li>';
   }
   if (printDate['pageindex'] - 2 > 2 && printDate['pageindex'] <= pageTotal && pageTotal > 5) {
      pagehtml += '<li><a href="javascript:">...</a></li>';
   }
   var start = printDate['pageindex'] - 2,
      end = printDate['pageindex'] + 2;
   if ((start > 1 && printDate['pageindex'] < 4) || printDate['pageindex'] == 1) {
      end++;
   }
   if (printDate['pageindex'] > pageTotal - 4 && printDate['pageindex'] >= pageTotal) {
      start--;
   }
   for (; start <= end; start++) {
      if (start <= pageTotal && start >= 1) {
         if (start != printDate['pageindex']) {
            pagehtml += '<li><a href="javascript:goPage(' + start + ')">' + start + '</a></li>';
         } else {
            pagehtml += '<li class="active"><a href="#">' + start + '</a></li>';
         }
      }
   }
   if (printDate['pageindex'] + 2 < pageTotal - 1 && printDate['pageindex'] >= 1 && pageTotal > 5) {
      pagehtml += '<li><a href="javascript:">...</a></li>';
   }
   if (printDate['pageindex'] != pageTotal && printDate['pageindex'] < pageTotal - 2 && pageTotal != 4) {
      pagehtml += '<li><a href="javascript:goPage(' + pageTotal + ')">' + pageTotal + '</a></li>';
   }
   pagehtml += '</div></ul>';

   if (printDate['pageindex'] == pageTotal) {
      pagehtml += '<p title="已是尾页" class="next_btn nohting_right  _Left"><a href="javascript:"><span class="next_bg"></span></a></p>';
   } else {
      pagehtml += '<p class="next_btn _Left"><a href="javascript:goPage(' + (printDate['pageindex'] + 1) + ')"><span class="next_bg"></span></a></p>';
   }
   /*pagehtml += '<div class="form _Left">';
   pagehtml += '<span class="pag_text">到第</span><input class="pag_input" type="number" value=' + printDate['pageindex'] + '><span class="text">页</span><a href="javascript:"><span class="pag_btn">确定</span></a>';
   pagehtml += '</div>';*/

   $('.page').html(pagehtml);

   var botpage = $('li[class="active"]').text();
   $('.top_pageNo').text(botpage);
   var pagetext = Number($('.top_pageNo').text());
   $('.top_next').click(function() {
      if (pagetext >= 　pageTotal) {
         $('.top_pageNo').text(pageTotal);
         $('.top_next').parent('a').attr('href', 'javascript:');
      } else {
         pagetext = pagetext + 1;
         $('.top_pageNo').text(pagetext);
         $('.top_next').parent('a').attr('href', 'javascript:goPage(' + pagetext + ')');
      }
   })
   $('.top_prev').click(function() {
      if (pagetext != 1) {
         pagetext = pagetext - 1;
         $('.top_pageNo').text(pagetext);
         $('.top_prev').parent('a').attr('href', 'javascript:goPage(' + pagetext + ')');
      }
   })
   $('.pag_btn').click(function() {
         var pageNum = $('.pag_input').val();
         if (pageNum > pageTotal) {
            $(this).parent('a').attr('href', 'javascript:goPage(' + pageTotal + ')');
         } else {
            $(this).parent('a').attr('href', 'javascript:goPage(' + pageNum + ')');
         }
      })
   //跳转页码，文本框激活时候的样式
   $(".pag_btn").focus(function() {
      $(".pag_btn").css("border-color", "#be7f19");
   });
}