分頁顯示中關於"序號"的問題


項目開發中要求列表顯示要明顯看到總條目數,所以就要求序號從1開始。

 

如下為從1開始的序號展示:

<s:iterator value="#request.pageView.records" var="model" status="stat">

<tr>

<td width="20%">${(request.pageView.currentpage-1)*request.pageView.maxresult+stat.count}</td>

</tr>

</s:iterator>

 

currentpage:表示當前頁碼

maxresult:每頁顯示條數

stat.count:iterator的索引為stat.index(從0開始),stat.count(從1開始)。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM