把结果集里的数据取出来循环成2行6列的怎么做啊? 我现在是在JSP里做程序,我可以把数据拿出来放到RS里,单循环tr可以循环成12行的,也可以循环td把它循环显示成12列的,但是我需要把它做成2行6列的,这个怎么做啊?!怎么循环才能出来?请教! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <tr>for(int j = 0; j < 12; i++;j++){ <td>第j个数据</td> if(i == 5) </tr><tr>}</tr>写的比较简,意思应该理解吧? <table border="0"> <tr> <logic:iterate id="temp" name="templatearray" indexId="index"> <td> <bean:write name="temp" property="templatename" /> </td> <%-- 控制换行,每行6列 --%> <c:if test="${(index+1)%6 == 0}"> </tr> <tr> </c:if> </logic:iterate> </tr></table> 你要是知道HTML怎么换行还会不明白吗 想了解一下北京软通动力软件公司情况 不一样的:Unable to compile class for JSP maven项目导入到eclipse之后的操作 请教一下如何将<jsp:usebean>中的类导入进来 我想用java在sql server和dbf文件之间导入导出,有没有知道怎么做啊? 网站开发中如何实现邮箱邦定。 求助!JSP的一个数据类型转换问题 究竟什么时候应该使用servlet?? 如何将tomcat4植入iis5? spring手动注入 数据库很快连接数就超了,怎么回事? jsp的关闭窗口事件 关于form中写action的问题
for(int j = 0; j < 12; i++;j++){
<td>第j个数据</td>
if(i == 5) </tr><tr>
}
</tr>
写的比较简,意思应该理解吧?
<tr>
<logic:iterate id="temp" name="templatearray" indexId="index">
<td>
<bean:write name="temp" property="templatename" />
</td>
<%-- 控制换行,每行6列 --%>
<c:if test="${(index+1)%6 == 0}">
</tr>
<tr>
</c:if>
</logic:iterate>
</tr>
</table>