2
나는이 자바 스크립트 <script></script>
에서 다음 코드를foreach jstl 태그에서 항목 수를 얻는 방법은 무엇입니까?
<c:forEach items="${lifeEvents}" var="event" varStatus="loop">
latitudes["${loop.index}"] = <c:out value="${event.place.location.latitude}"/>;
longitudes["${loop.index}"] = <c:out value="${event.place.location.longitude}"/>;
lastEvent = "${loop.index}";
if("${loop.index}" > 0)
waypointEvents["${loop.index}"] = new google.maps.LatLng(latitudes["${loop.index}"],longitudes["${loop.index}"]);
</c:forEach>
어떻게 내가 lifeEvents 목록에 존재 LifeEvents의 정확한 수를 알 수 있는가?
당신의 lifeEvents 콜렉션 인 경우