<c:forEach [var="varname"] [varStatus="varstatusName"] [begin="开始"] [end="结束"] [step="step"]> Java程序或HTML代码 </c:forEach>或
<c:forEach item="collection" [var="varname" [varStatus="varstatusName"] [begin="开始"] [end="结束"] [step="step"]]> Java程序或HTML代码 </c:forEach>其中:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <title>编程帮(www.lmcjl.com)</title> </head> <body> <body> <c:forEach var="i" begin="1" end="5"> <c:out value="${i}" /> </c:forEach> </body> </html>
1 2 3 4 5 6 7 8 9 10
本文链接:http://task.lmcjl.com/news/12642.html