JSP-2020年3月10日-第二周
作业:利用Java程序片,用for二重循环输出一个3行5列的table
考察JSP程序片和HTML代码结合使用
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
<marquee>JSP-2020年3月10日-第二周</marquee>
<table border="7" cellspacing="10" cellpadding="20" style="border-color: cornflowerblue;margin: 0 auto" >
<%for(int i=1;i<4;i++){%>
<tr>
<%for(int j=1;j<6;j++){%>
<td><%=i+"*"+j%></td>
<%}%>
</tr>
<%}%>
</table>
</body>
</html>


浙公网安备 33010602011771号