根据集合动态生成多个多选框并这设置其id的值

来源:互联网 发布:看电影用什么软件 编辑:程序博客网 时间:2024/06/06 20:52
<c:forEach var="r" items="${right}" varStatus="i">
             <div>
             <input type="checkbox" name="checkbox" value = "${r.right_id}" id = "${r.right_id }"/>
           ${r.right_name}
           <br><br>&nbsp; &nbsp;&nbsp; &nbsp;
           <c:forEach var="rr" items="${r.list}" varStatus="i">
            <input type="checkbox" name="checkbox" value = "${rr.right_id}" id="${rr.right_id}"/>
              ${rr.right_name}
            <c:if test="${i.count%6==0&&!i.last}">
             <br>&nbsp; &nbsp;&nbsp; &nbsp;
            </c:if>
            </c:forEach>
          </div>
          <br>
   </c:forEach>
原创粉丝点击