求一JSP的完整代码,要求:用for循环,实现输出一个三行三列的表格。注意:要能运行通过的完整的JSP代码。
1个回答
展开全部
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
This is my JSP page. <br>
<table border="1">
<%for(int i=0;i<3;i++){%>
<tr>
<td width="50"><%=i %></td>
<td width="50"><%=i %></td>
<td width="50"><%=i %></td>
</tr>
<%} %>
</table>
</body>
</html>
不知道是不是这种效果
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
This is my JSP page. <br>
<table border="1">
<%for(int i=0;i<3;i++){%>
<tr>
<td width="50"><%=i %></td>
<td width="50"><%=i %></td>
<td width="50"><%=i %></td>
</tr>
<%} %>
</table>
</body>
</html>
不知道是不是这种效果
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |