通过数据库或直接在HTML给每条数据加序号

1.通过数据库
row_number() over(order by 本身表的列名 desc ) seq,


2.通过HTML:
1. <th name="fixcol"><span>序号</span></th> 
2.  <c:forEach items="${pagination.resultList}" var="list" varStatus="ind">  
3.<td>${(pagination.page-1)*10+(ind.index+1)}</td>
这样不需要改后台代码
前提是有使用pagination

猜你喜欢

转载自appleses.iteye.com/blog/1537163