`

c:forEach实现每三个换行

 
阅读更多
<tr>
			<c:if test="${not empty properList}">
				<c:forEach var="object" items="${properList}"  varStatus="status">
					<c:if test="${(status.index+1) mod 3 !=1}">
		           		<td noWrap class="td_title" width="8%" align="center">${object.propertyName }</td>
						<td class="td_detail">
							<input type="text"  id="${object.propertyName }" name="${object.propertyName }" />
						</td>
		           </c:if>
           		   <c:if test="${(status.index+1) mod 3==1}">
		        	<tr>
		        		<td noWrap class="td_title" width="8%" align="center">${object.propertyName }</td>
						<td class="td_detail">
							<input type="text"  id="${object.propertyName }" name="${object.propertyName }" />
						</td>
		          </c:if>
				</c:forEach>
			</c:if>
		</tr>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics