Struts iterative problem resolution: How to display multiple records in one line (the same field): The following example four data per line
<% INT i = 0;%>
<% IF (4 == i || 0 == i) {i = 0;%>
<%}%>
[Y1]
td>
<% IF (3! = i)
{i ;} else {i ;%>
TR>
[y2] <%}%>
logic: Iterate>
<% IF (3! = (i-1)) {%>
TR>
<%}% [Y3]>
logic: present> TABLE>
Xmp>
[Y1] The first and fourth times need the |
tag
[Y2] Note that I is 3, not 4
[Y3] To ensure that there is no four elements, it is necessary to add a tr> tag.
转载请注明原文地址:https://www.9cbs.com/read-66889.html