<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>19*19</title>
</head>
<body>
<h1 align="center">19 * 19</h1>
<table border="1" width="80%">
<%
for (int i = 0; i <= 20; i++) {
%>
<tr>
<%
for (int j = 0; j < 20; j++) {
if (i == 0 && j == 0) {
%>
<td><%="x"%></td>
<%
} else if (i == 0) {
%>
<td><%=j%></td>
<%
} else if (j == 0) {
%>
<td><%=i%></td>
<%
} else {
%>
<td><%=i + "x" + j + "=" + i * j%></td>
<%
}
}
%>
</tr>
<%
}
%>
</table>
</body>
</html>
JSP实例:大九九乘法表
最新推荐文章于 2023-11-29 06:43:22 发布