📄 c_foreach_3.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title> c_forEach3.jsp</title>
</head>
<body>
<h2><c:out value="<c:forEach> begin、end和step的用法" /></h2>
<%
String values[] = new String [3];
values[0]="hello";
values[1]="JSP";
values[2]="world";
request.setAttribute("values", values);
%>
<c:forEach items="${values}" var="item" varStatus="s">
<h2><c:out value="${item}"/>的四种属性:</h2>
curernt item's index:${s.index}</br>
total counts at this item:${s.count}</br>
curernt item is first:${s.first}</br>
curernt item is last:${s.last}</br>
</c:forEach>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -