帮忙看看jsp里的分页# Programming - 葵花宝典
i*c
1 楼
跪求分页实现,如何把太多的页码也分为如此格式:previous|1|2|...|10|next?
long cPage;
cPage = (hits.getTotal() / 10) + 1;
if ((cPage * 10) + 1 >= hits.getTotal())
{
cPage++;
}
if(cPage>100)
{cPage=100;}
int p;
for(p = 1; p < cPage ; p++)
{
out.println("queryLang + " &start="+ (p-1) * 10 + " &hitsPerPage=" + hitsPerPage + " &
hitsPerSite=" + 0 + "&clustering=>"+ p +" | ");
}
给包子50
long cPage;
cPage = (hits.getTotal() / 10) + 1;
if ((cPage * 10) + 1 >= hits.getTotal())
{
cPage++;
}
if(cPage>100)
{cPage=100;}
int p;
for(p = 1; p < cPage ; p++)
{
out.println("queryLang + " &start="+ (p-1) * 10 + " &hitsPerPage=" + hitsPerPage + " &
hitsPerSite=" + 0 + "&clustering=>"+ p +" | ");
}
给包子50