java - <c:forEach>标签递增问题。
大家讲道理
大家讲道理 2017-04-18 09:54:01
0
1
595
<c:forEach var="reply" varStatus="i" items=${paging.list}>
<span>${i.count}</span>
...
//...一大段其他内容
</c:forEach>

我想让那个第一个span里面的设置成一个一直递增的变量,不会归一重新开始,而我这样设置的${i.count}它每次翻页就重新从1开始计数了。应该怎么设置呢?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
PHPzhong

<c:forEach>The varStatus of the tag is used to record some information of the output line. Every time you turn the page, the data must be refreshed, so it starts from 1 every time. To achieve the effect of +1 when turning a page , you can consider storing the value in the session, and add 1 when turning a page

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template