JSP语法_史国旭的个人总结(3)
</tr>
</table>
</form>
</center>
</body>
</html>
//result1.jsp
[html]
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'jiujiu.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>
<font size=12 color=red>亲,这就是你想要的乘法口诀表!!</font>
<br>
<%
//int startNum=Integer.valueOf(request.getParameter("startNumber"));
int startNum=Integer.parseInt(request.getParameter("startNumber"));
//int endNum=Integer.valueOf(request.getParameter("endNumber"));
int endNum=Integer.parseInt(request.getParameter("endNumber"));
for(int i=startNum; i<=endNum; i++)
{
for(int j=1; j<=i; j++) www.2cto.com
{
out.print(j+"*"+i+"="+(i*j)+"\t");
out.print(" ");
}
out.print("<br/>");
}
%>
</body>
</html>
相关新闻>>
- 发表评论
-
- 最新评论 更多>>