jstl使用foreach 循环遍历输出表格和数据
来源:互联网 发布:罗马2 兵种数据修改 编辑:程序博客网 时间:2024/05/18 21:41
问题
开发中,如果使用jstl使用foreach循环的时候出现遍历的内容界面乱版,如果不用css 样式控制一下的话可以通过遍历输出表格的方式来控制
办法
<c:forEach items="${bills}" var="item" varStatus="t" step="3"> <tr> <c:if test="${t.count}%5==0"> <td> <div class="check-box"> <input name="role" value="${bills[t.index].billId}" type="checkbox" id="box-${t.count}+0" > <label for="box-${t.count}">${bills[t.index].billNm} </label> </div> </td> </c:if> <td> <div class="check-box"> <input name="role" value="${bills[t.index+1].billId}" type="checkbox" id="box-${t.count}+1" > <label for="box-${t.count}+1">${bills[t.index+1].billNm}</label> </div> </td> <td> <div class="check-box"> <input name="role" value="${bills[t.index+2].billId}" type="checkbox" id="box-${t.count}+2" > <label for="box-${t.count}+2">${bills[t.index+2].billNm}</label> </div> </td> </tr> </c:forEach>
阅读全文
2 0
- jstl使用foreach 循环遍历输出表格和数据
- <volist>和<foreach>循环输出list数据
- jstl <c:foreach>标签进行数据遍历
- Jstl的foreach循环中用el表达式输出集合
- jstl之foreach循环
- jstl之foreach循环
- jstl之forEach循环
- JSTL跳出forEach循环
- foreach循环遍历数组和集合
- Java数组和foreach遍历循环
- Jstl标签循环输出Map中的数据
- 使用foreach循环输出数组中的元素
- Smarty使用foreach语句循环输出数组
- C:forEach*循环表格~
- <C:forEach>表格循环
- 使用JSTL的forEach标签实现倒序遍历
- jstl的forEach使用和jstl变量实现自增
- jstl循环生成表格
- OpenSSL命令详解
- cobbler无人值守安装
- 测量程序执行时间·九
- 2017 西南交通大学ACM校赛简易题解
- pta试题训练
- jstl使用foreach 循环遍历输出表格和数据
- Python 高阶 Python函数式编程以及高阶函数reduce,sorted,filter
- 查找二叉树的实现(查找,删除,插入)分别用递归和非递归
- (一)spring boot 不继承parent搭建环境-入门
- centos 不执行/etc/rc.local 的问题
- kobject
- sicp(1) 正则序和应用序
- 时间复杂度和空间复杂度
- Xutils中网络请求