JSTL
JSTL forEach 문 varStatus 값 사용하기
SeoHW
2018. 12. 20. 10:32
SMALL
forEach문은 아래와 같이 활용한다.
<c:forEach items="${data}" var="변수값" varStatus="status">
<td>
${status.current} 현재 for문의 해당하는 번호
${status.index} 0부터의 순서
${status.count} 1부터의 순서
${status.first} 첫 번째인지 여부
${status.last} 마지막인지 여부
${status.begin} for문의 시작 번호
${status.end} for문의 끝 번호
${status.step} for문의 증가값
</td>
</c:forEach>
${status.current} 현재 for문의 해당하는 번호
${status.index} 0부터의 순서
${status.count} 1부터의 순서
${status.first} 첫 번째인지 여부
${status.last} 마지막인지 여부
${status.begin} for문의 시작 번호
${status.end} for문의 끝 번호
${status.step} for문의 증가값
사용 하시면 됩니다!
LIST