有的時候,不得不使用循環中的索引,比如label對應的單選多選:
<c:forEach items="${lpalls }" var="pall" varStatus="status"> <label for="${status.index}">${pall.name}</label> <input type="checkbox" value="${pall.id}" /> </c:forEach>
這樣就有label指向到唯一的input標簽啦
有的時候,不得不使用循環中的索引,比如label對應的單選多選:
<c:forEach items="${lpalls }" var="pall" varStatus="status"> <label for="${status.index}">${pall.name}</label> <input type="checkbox" value="${pall.id}" /> </c:forEach>
這樣就有label指向到唯一的input標簽啦
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。