关于分页Pagination的使用

时间:2024-04-20 11:08:15

在这个例子当中,用的是ssm框架整合,并且用的是Pagination实现分页

先来看一下分页中用到的类的源码

Paginable.java

 package cn.itcast.common.page;

 /**
* 分页接口
*/
public interface Paginable {
/**
* 总记录数
*
* @return
*/
public int getTotalCount(); /**
* 总页数
*
* @return
*/
public int getTotalPage(); /**
* 每页记录数
*
* @return
*/
public int getPageSize(); /**
* 当前页号
*
* @return
*/
public int getPageNo(); /**
* 是否第一页
*
* @return
*/
public boolean isFirstPage(); /**
* 是否最后一页
*
* @return
*/
public boolean isLastPage(); /**
* 返回下页的页号
*/
public int getNextPage(); /**
* 返回上页的页号
*/
public int getPrePage();
}

Pagination.java

 package cn.itcast.common.page;

 import java.util.ArrayList;
import java.util.List; /**
* 列表分页。包含list属性。
*/
public class Pagination extends SimplePage{ public Pagination() {
} /**
* 构造器
*
* @param pageNo
* 页码
* @param pageSize
* 每页几条数据
* @param totalCount
* 总共几条数据
*/
public Pagination(int pageNo, int pageSize, int totalCount) {
super(pageNo, pageSize, totalCount); } /**
* 构造器
*
* @param pageNo
* 页码
* @param pageSize
* 每页几条数据
* @param totalCount
* 总共几条数据
* @param list
* 分页内容
*/
public Pagination(int pageNo, int pageSize, int totalCount, List<?> list) {
super(pageNo, pageSize, totalCount);
this.list = list;
} /**
* 第一条数据位置
*
* @return
*/
public int getFirstResult() {
return (pageNo - 1) * pageSize;
} /**
* 当前页的数据
*/
private List<?> list; /**
* 当前页的分页样式
*/
private List<String> pageView; /**
* 获得分页内容
*
* @return
*/
public List<?> getList() {
return list;
} /**
* 设置分页内容
*
* @param list
*/
@SuppressWarnings("unchecked")
public void setList(List list) {
this.list = list;
}
/**
* 获得分页样式
*
* @return
*/
public List<String> getPageView() {
return pageView;
}
/**
* 设置分页样式
*
* @param list
*/
public void setPageView(List<String> pageView) {
this.pageView = pageView;
} /**
* 分页显示样示部分
*/
public void pageView(String url,String params){ pageView = new ArrayList<String>(); if(this.pageNo != 1){
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo=1'\"><font size=2>首页</font></a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo-1)+"'\"><font size=2>上一页</font></a>");
}else{
pageView.add("<font size=2>首页</font>");
pageView.add("<font size=2>上一页</font>");
} if(this.getTotalPage() <= 10){
for (int i = 0; i < this.getTotalPage(); i++) {
if((i+1)==this.pageNo){
pageView.add("<strong>"+this.pageNo+"</strong>");
i = i+1;
if(this.pageNo==this.getTotalPage())break;
}
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(i+1)+"'\">"+(i+1)+"</a>");
}
}else if(this.getTotalPage() <= 20){
//没有把...加上
int l = 0;
int r = 0;
if(this.pageNo<5){
l=this.pageNo-1;
r=10-l-1;
}else if(this.getTotalPage()-this.pageNo<5){
r=this.getTotalPage()-this.pageNo;
l=10-1-r;
}else{
l=4;
r=5;
}
int tmp = this.pageNo-l;
for (int i = tmp; i < tmp+10; i++) {
if(i==this.pageNo){
pageView.add("<strong>"+this.pageNo+"</strong>");
i = i+1;
if(this.pageNo==this.getTotalPage()) break;
}
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(i)+"'\">"+(i)+"</a>");
} }else if(this.pageNo<7){
for (int i = 0; i < 8; i++) {
if(i+1==this.pageNo){
pageView.add("<strong>"+this.pageNo+"</strong>");
i = i+1;
}
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(i+1)+"'\">"+(i+1)+"</a>");
}
pageView.add("...");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.getTotalPage()-1)+"'\">"+(this.getTotalPage()-1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.getTotalPage())+"'\">"+(this.getTotalPage())+"</a>");
}else if(this.pageNo>this.getTotalPage()-6){
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(1)+"'\">"+(1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(2)+"'\">"+(2)+"</a>");
pageView.add("...");
for (int i = this.getTotalPage()-8; i <this.getTotalPage() ; i++) {
if(i+1==this.pageNo){
pageView.add("<strong>"+this.pageNo+"</strong>");
i = i+1;
if(this.pageNo==this.getTotalPage()) break;
}
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(i+1)+"'\">"+(i+1)+"</a>");
}
}else{
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(1)+"'\">"+(1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(2)+"'\">"+(2)+"</a>");
pageView.add("..."); pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo-2)+"'\">"+(this.pageNo-2)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo-1)+"'\">"+(this.pageNo-1)+"</a>");
pageView.add("<strong>"+this.pageNo+"</strong>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo+1)+"'\">"+(this.pageNo+1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo+2)+"'\">"+(this.pageNo+2)+"</a>"); pageView.add("...");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.getTotalPage()-1)+"'\">"+(this.getTotalPage()-1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.getTotalPage())+"'\">"+(this.getTotalPage())+"</a>");
}
if(this.pageNo != this.getTotalPage()){
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo+1)+"'\"><font size=2>下一页</font></a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+this.getTotalPage()+"'\"><font size=2>尾页</font></a>");
} else{
pageView.add("<font size=2>下一页</font>");
pageView.add("<font size=2>尾页</font>");
}
pageView.add("共<var>" + getTotalPage() + "</var>页 到第<input type='text' id='PAGENO' size='3' />页 <input type='button' id='skip' class='hand btn60x20' value='确定' onclick=\"javascript:window.location.href = '" + url + "?" + params + "&pageNo=' + $('#PAGENO').val() \"/>");
}
}

SimplePage.java

 package cn.itcast.common.page;

 /**
* 简单分页类
*/
public class SimplePage implements java.io.Serializable,Paginable { private static final long serialVersionUID = 1L;
public static final int DEF_COUNT = 20; /**
* 检查页码 checkPageNo
*
* @param pageNo
* @return if pageNo==null or pageNo<1 then return 1 else return pageNo
*/
public static int cpn(Integer pageNo) {
return (pageNo == null || pageNo < 1) ? 1 : pageNo;
} public SimplePage() {
} /**
* 构造器
*
* @param pageNo
* 页码
* @param pageSize
* 每页几条数据
* @param totalCount
* 总共几条数据
*/
public SimplePage(int pageNo, int pageSize, int totalCount) {
setTotalCount(totalCount);
setPageSize(pageSize);
setPageNo(pageNo);
adjustPageNo(); } /**
* 调整页码,使不超过最大页数
*/
public void adjustPageNo() {
if (pageNo == 1) {
return;
}
int tp = getTotalPage();
if (pageNo > tp) {
pageNo = tp;
}
} /**
* 获得页码
*/
public int getPageNo() {
return pageNo;
} /**
* 每页几条数据
*/
public int getPageSize() {
return pageSize;
} /**
* 总共几条数据
*/
public int getTotalCount() {
return totalCount;
} /**
* 总共几页
*/
public int getTotalPage() {
int totalPage = totalCount / pageSize;
if (totalPage == 0 || totalCount % pageSize != 0) {
totalPage++;
}
return totalPage;
} /**
* 是否第一页
*/
public boolean isFirstPage() {
return pageNo <= 1;
} /**
* 是否最后一页
*/
public boolean isLastPage() {
return pageNo >= getTotalPage();
} /**
* 下一页页码
*/
public int getNextPage() {
if (isLastPage()) {
return pageNo;
} else {
return pageNo + 1;
}
} /**
* 上一页页码
*/
public int getPrePage() {
if (isFirstPage()) {
return pageNo;
} else {
return pageNo - 1;
}
} protected int totalCount = 0;
protected int pageSize = 20;
protected int pageNo = 1; /**
* if totalCount<0 then totalCount=0
*
* @param totalCount
*/
public void setTotalCount(int totalCount) {
if (totalCount < 0) {
this.totalCount = 0;
} else {
this.totalCount = totalCount;
}
} /**
* if pageSize< 1 then pageSize=DEF_COUNT
*
* @param pageSize
*/
public void setPageSize(int pageSize) {
if (pageSize < 1) {
this.pageSize = DEF_COUNT;
} else {
this.pageSize = pageSize;
}
} /**
* if pageNo < 1 then pageNo=1
*
* @param pageNo
*/
public void setPageNo(int pageNo) {
if (pageNo < 1) {
this.pageNo = 1;
} else {
this.pageNo = pageNo;
}
}
}

好了,下面是我写的项目的源码,用的就是这个Pagination来实现分页

BrandController.java

 package cn.lzc.code.controller.admin;

 import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping; import cn.itcast.common.page.Pagination;
import cn.lzc.code.po.Brand;
import cn.lzc.code.service.BrandService; /**
* 品牌管理Controller
*
* @author admin
*
*/
@Controller
@RequestMapping("/brand")
public class BrandController {
// 自动装配
@Autowired
private BrandService brandService; /**
* 获取 品牌列表,按条件搜索
*
* @return
*/
@RequestMapping(value = "list.do")
public String list(Integer pageNo, String name, Integer isDisplay, Model model) {
// 分页查询品牌,按条件搜索
Pagination pagination = brandService.getBrandListByQuery(pageNo, name, isDisplay);
// 添加显示到页面
model.addAttribute("pagination", pagination);
// 回显查询条件name
model.addAttribute("name", name);
// 回显查询条件isDisplay
model.addAttribute("isDisplay", isDisplay);
return "brand/list";
}
}

BrandService.java

 package cn.lzc.code.service;

 import java.util.List;

 import cn.itcast.common.page.Pagination;
import cn.lzc.code.po.Brand; /**
* 品牌接口
*
* @author admin
*
*/
public interface BrandService {
/**
* 根据条件查询品牌,可分页
*
* @param pageNo
* @param name
* @param isDisplay
* @return
*/
public Pagination getBrandListByQuery(Integer pageNo, String name, Integer isDisplay); }

BrandServiceImpl.java

 package cn.lzc.code.service.impl;

 import java.util.List;

 import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import cn.itcast.common.page.Pagination;
import cn.lzc.code.mapper.BrandMapper;
import cn.lzc.code.po.Brand;
import cn.lzc.code.po.vo.BrandQuery;
import cn.lzc.code.service.BrandService; /**
* 品牌管理实现类
*
* @author admin
*
*/
@Service
public class BrandServiceImpl implements BrandService {
// 自动装配
@Autowired
private BrandMapper brandMapper; /**
* 根据条件查询品牌,可分页
*/
public Pagination getBrandListByQuery(Integer pageNo, String name, Integer isDisplay) {
// 如果传入的是字符串,那就是null
if (name != null)
if ("".equals(name.trim())) {
name = null;
}
// 创建一个传递参数的品牌查询
BrandQuery brandQuery = new BrandQuery();
// 设置查询品牌可见的,1为可见,0为不可见
brandQuery.setIsDisplay(1); // 拼接条件,显示url
StringBuilder str = new StringBuilder();
if (name != null) {
brandQuery.setName(name);
str.append("name=").append(name);
}
if (isDisplay != null) {
brandQuery.setIsDisplay(isDisplay);
str.append("&isDisplay=").append(isDisplay);
} else {
// 设置只能查询 可见的品牌
brandQuery.setIsDisplay(1);
str.append("&isDisplay=").append(1);
} // 查询brand的总记录数
int totalCount = brandMapper.getBrandCount(brandQuery); // cpn方法,如果pageNo<1或为空,则设置为1
int pageNo1 = Pagination.cpn(pageNo); // 设置开始页
brandQuery.setPageNo(pageNo1); // 查询品牌总记录
List<Brand> brands = brandMapper.getBrandListByQuery(brandQuery);
// 构建分页对象
// 四个参数,当前页数,每页显示的记录数,总记录数,查询出来的列表也就是要显示的列表
Pagination pagination = new Pagination(pageNo1, brandQuery.getPageSize(), totalCount, brands);
// 分页在页面显示 /brand/list.do?name=aaa&&isDisplay=1
String url = "/brand/list.do";
pagination.pageView(url, str.toString()); // 返回分页对象
return pagination;
} }
 cpn方法,用来判断当前页pageNo,如果pageNo<1或为空,则设置为1
源码
    /**
* 检查页码 checkPageNo
*
* @param pageNo
* @return if pageNo==null or pageNo<1 then return 1 else return pageNo
*/
public static int cpn(Integer pageNo) {
return (pageNo == null || pageNo < 1) ? 1 : pageNo;
}

BrandMapper.java

 package cn.lzc.code.mapper;

 import java.util.List;

 import cn.lzc.code.po.Brand;
import cn.lzc.code.po.vo.BrandQuery; /**
* 品牌Mapper
*
* @author admin
*
*/
public interface BrandMapper {
/**
* 查询brand的总记录数
* @param brandQuery
*
* @return
*/
public int getBrandCount(BrandQuery brandQuery); /**
* 根据条件查询品牌,可分页
*
* @param brandQuery
* @return
*/
public List<Brand> getBrandListByQuery(BrandQuery brandQuery); }

BrandMapper.xml

 <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!-- 返回结果与javaBean Brand对象中的属性 映射关系 -->
<mapper namespace="cn.lzc.code.mapper.BrandMapper">
<resultMap type="cn.lzc.code.po.Brand" id="brand">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="description" column="description" />
<result property="imgUrl" column="img_url" />
<result property="webSite" column="web_site" />
<result property="sort" column="sort" />
<result property="isDisplay" column="is_display" />
</resultMap> <!-- 查询品牌总记录数 -->
<select id="getBrandCount" parameterType="cn.lzc.code.po.vo.BrandQuery"
resultType="Integer">
select
count(*)
from
bbs_brand
<where>
is_display=#{isDisplay} <if test="name !=null">
and name = #{name}
</if>
</where>
</select> <!-- 根据条件查询品牌,可分页 -->
<select id="getBrandListByQuery" parameterType="cn.lzc.code.po.vo.BrandQuery"
resultMap="brand">
select
id,name,description,img_url,web_site,sort,is_display
from
bbs_brand
<where>
is_display=#{isDisplay}
<if test="name !=null">
and name like '%${name}%'
</if>
</where>
order by id asc
limit ${startRow} , ${pageSize}
</select> </mapper>

jsp页面

    <tbody class="pn-ltbody">
<c:forEach items="${pagination.list}" var="brand">
<tr bgcolor="#ffffff" onmouseout="this.bgColor='#ffffff'" onmouseover="this.bgColor='#eeeeee'">
<td>
<input type="checkbox" value="${brand.id}" name="ids"/></td>
<td align="center">${brand.id }</td>
<td align="center">${brand.name }</td>
<td align="center"><img width="40" height="40" src="${brand.allImgUrl}"/></td>
<td align="center">${brand.description}</td>
<td align="center">${brand.sort}</td>
<td align="center">
<c:if test="${brand.isDisplay==1}">是</c:if>
<c:if test="${brand.isDisplay==0}">否</c:if>
</td>
<td align="center">
<a class="pn-opt" href="#">修改</a> | <a class="pn-opt" onclick="if(!confirm('您确定删除吗?')) {return false;}" href="#">删除</a>
</td>
</tr>
</c:forEach>
</tbody> <div class="page pb15">
<span class="r inb_a page_b">
<c:forEach items="${pagination.pageView }" var="page">
${page }
</c:forEach>
</span>
</div>

分页样式显示的样式及部分代码

关于分页Pagination的使用

 /**
* 分页显示样示部分
*/
public void pageView(String url,String params){ pageView = new ArrayList<String>(); if(this.pageNo != 1){
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo=1'\"><font size=2>首页</font></a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo-1)+"'\"><font size=2>上一页</font></a>");
}else{
pageView.add("<font size=2>首页</font>");
pageView.add("<font size=2>上一页</font>");
} if(this.getTotalPage() <= 10){
for (int i = 0; i < this.getTotalPage(); i++) {
if((i+1)==this.pageNo){
pageView.add("<strong>"+this.pageNo+"</strong>");
i = i+1;
if(this.pageNo==this.getTotalPage())break;
}
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(i+1)+"'\">"+(i+1)+"</a>");
}
}else if(this.getTotalPage() <= 20){
//没有把...加上
int l = 0;
int r = 0;
if(this.pageNo<5){
l=this.pageNo-1;
r=10-l-1;
}else if(this.getTotalPage()-this.pageNo<5){
r=this.getTotalPage()-this.pageNo;
l=10-1-r;
}else{
l=4;
r=5;
}
int tmp = this.pageNo-l;
for (int i = tmp; i < tmp+10; i++) {
if(i==this.pageNo){
pageView.add("<strong>"+this.pageNo+"</strong>");
i = i+1;
if(this.pageNo==this.getTotalPage()) break;
}
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(i)+"'\">"+(i)+"</a>");
} }else if(this.pageNo<7){
for (int i = 0; i < 8; i++) {
if(i+1==this.pageNo){
pageView.add("<strong>"+this.pageNo+"</strong>");
i = i+1;
}
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(i+1)+"'\">"+(i+1)+"</a>");
}
pageView.add("...");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.getTotalPage()-1)+"'\">"+(this.getTotalPage()-1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.getTotalPage())+"'\">"+(this.getTotalPage())+"</a>");
}else if(this.pageNo>this.getTotalPage()-6){
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(1)+"'\">"+(1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(2)+"'\">"+(2)+"</a>");
pageView.add("...");
for (int i = this.getTotalPage()-8; i <this.getTotalPage() ; i++) {
if(i+1==this.pageNo){
pageView.add("<strong>"+this.pageNo+"</strong>");
i = i+1;
if(this.pageNo==this.getTotalPage()) break;
}
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(i+1)+"'\">"+(i+1)+"</a>");
}
}else{
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(1)+"'\">"+(1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(2)+"'\">"+(2)+"</a>");
pageView.add("..."); pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo-2)+"'\">"+(this.pageNo-2)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo-1)+"'\">"+(this.pageNo-1)+"</a>");
pageView.add("<strong>"+this.pageNo+"</strong>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo+1)+"'\">"+(this.pageNo+1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo+2)+"'\">"+(this.pageNo+2)+"</a>"); pageView.add("...");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.getTotalPage()-1)+"'\">"+(this.getTotalPage()-1)+"</a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.getTotalPage())+"'\">"+(this.getTotalPage())+"</a>");
}
if(this.pageNo != this.getTotalPage()){
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+(this.pageNo+1)+"'\"><font size=2>下一页</font></a>");
pageView.add("<a href=\"javascript:void(0);\" onclick=\"javascript:window.location.href='" + url + "?" + params + "&pageNo="+this.getTotalPage()+"'\"><font size=2>尾页</font></a>");
} else{
pageView.add("<font size=2>下一页</font>");
pageView.add("<font size=2>尾页</font>");
}
pageView.add("共<var>" + getTotalPage() + "</var>页 到第<input type='text' id='PAGENO' size='3' />页 <input type='button' id='skip' class='hand btn60x20' value='确定' onclick=\"javascript:window.location.href = '" + url + "?" + params + "&pageNo=' + $('#PAGENO').val() \"/>");
}