<c:forEach>标签的语法定义如下所示。

                    <c:forEach var="name" items="expression" varStatus="name" 

                             begin="expression" end="expression" step="expression">

                             body content 

                    </c:forEach>

常用的属性<c:forEach var="xx" items="expression" varStatus="status" > 

<c:if test="${status.first}"><c:set var="firstPrice">${xx}</c:set></c:if>

</c:forEach>

 

<c:set var="salary" scope="session" value="${2000*2}"/>
<c:out value="${salary}"/>
posted on 2016-04-19 11:14  前端小菜j  阅读(520)  评论(0编辑  收藏  举报