我需要一个分页链接,如Prev 1-10 Next
,Prev 11-20 Next
等。我有一个数组列表,比如 arList ,其中包含 300 条记录。我需要先显示前 10 条记录。仅单击下一步时,我需要显示下一个 10。
任何人都可以分享一个链接或资源有类似的想法吗?
ArrayList arList = new ArrayList();
arList = // calling method to retrieve elements
// table starts here
<table id="tbl">
for(int i=0; i < arList.size();i++)
{
HashMap hMap=(HashMap)arList.get(i);
firstVal= (String)hMap.get("first");
secondVal= (String)hMap.get("second");
%><tr><td>
// firstVal and secondVal goes here
</tr></td><%
}
</table>