问题遇到的现象和发生背景
设计一个表单页面,创建表格点击按钮后无法跳转,就是在运行中但是没有完成
问题相关代码,请勿粘贴截图
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String rowNum = request.getParameter("rowNum");
String colNum = request.getParameter("colNum");
%>
<table width="800" border="1">
<%for(int i=1;i<=Integer.parseInt(rowNum);i++) {%>
<tr>
<%for(int j=1;j<=Integer.parseInt(colNum);i++) {%>
<td>第<%out.println(i); %>行第
<%out.println(j); %>列的单元格</td>
<%} %>
</tr>
<% }%>
</table>
<a href=index.jsp>返回输入行和列的页面</a>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="table.jsp">
请输入表格的行:<input type="text"name="rowNum" value=""/>
<br/>
请输入表格的列:<input type="text"name="colNum" value=""/>
<br/>
<input type="submit" value="生成表格"/>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String rowNum = request.getParameter("rowNum");
String colNum = request.getParameter("colNum");
%>
<table width="800" border="1">
<%for(int i=1;i<=Integer.parseInt(rowNum);i++) {%>
<tr>
<%for(int j=1;j<=Integer.parseInt(colNum);i++) {%>
<td>第<%out.println(i); %>行第
<%out.println(j); %>列的单元格</td>
<%} %>
</tr>
<% }%>
</table>
<a href=index.jsp>返回输入行和列的页面</a>
</body>
</html>