如何在JSP页面中编写for循环?
以下是for循环示例-
<%! int fontSize; %>
<html>
<head>
<title>FOR LOOP Example</title>
</head>
<body>
<%for ( fontSize = 1; fontSize <= 3; fontSize++){ %>
<font color = "green" size = "<%= fontSize %>">
JSP Tutorial
</font><br />
<%}%>
</body>
</html>上面的代码将产生以下结果-
JSP Tutorial JSP Tutorial JSP Tutorial