当前位置:首页 > JSP教程 > JSP常见问题

jsp 页面上图片分行输出小技巧

<table border="0" cellpadding="2">
<c:foreach items="${pics}" var="pic" varstatus="status">

<c:if test="${((status.index)%3)==0}"><tr></c:if>

<td>
<input class='input-0-border' name="bk_no" type="radio" value="${pic.piccode}"
<c:if test="${status.index==0}">checked</c:if>
onclick='changeval(this.value)'/>
<c:if test="${not empty(pic.logopath)}"><img src="${pic.logopath}"></c:if>
<c:if test="${empty(pic.logopath)}"><c:out value="${pic.picname}"/></c:if>
<input type="hidden" name="bk_name" value="<c:out value="${pic.picname}"/>">
</td>

<c:if test="${((status.index+1)%3)==0}"></tr></c:if>

</c:foreach>
</table>


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!