现在的位置: 首页 > 综合 > 正文

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

2018年05月05日 ⁄ 综合 ⁄ 共 567字 ⁄ 字号 评论关闭

<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>

抱歉!评论已关闭.