使用JSTL 对在页面上对 0,0,1 的分割处理 forTokens

使用JSTL 对在页面上对 0,0,1 的分割处理

<tr
onmouseover="currentcolor=this.style.backgroundColor;this.style.backgroundColor='#f0f7ff'"
onmouseout="this.style.backgroundColor=currentcolor">
<td width="10%" class="main_matter_td">位置信息</td>
<td width="40%" align="left" class="main_matter_td">
<input name="positionNum" id="positionNum" type="text" class="textBox" value="${str}" size="24" onblur="unamecheck();" />
${str2}

<c:forTokens items="${entity.positionNum}" begin="0" step="1" delims="," var="aValue" varStatus="status">
<!-- ${aValue} -->
<c:if test="${status.count==1}"><c:out value="${aValue}" />页</c:if>
<c:if test="${status.count==2}"><c:out value="${aValue}" />行</c:if>
<c:if test="${status.count==3}"><c:out value="${aValue}" />列</c:if>
</c:forTokens>
</td>

原文地址:https://www.cnblogs.com/meimao5211/p/3256401.html