WEB开发网
开发学院WEB开发Jsp Jsp页面九九乘法表 阅读

Jsp页面九九乘法表

 2012-11-08 19:42:24 来源:WEB开发网   
核心提示: <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%><%@page import="org.omg.CORBA.Request"

 <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@page import="org.omg.CORBA.Request"%>
<%
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 'JspNum.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>
<table >
<%
int x = Integer.valueOf(request.getParameter("start"));
int y = Integer.valueOf(request.getParameter("end"));
for(int i=x;i<=y;i++){%>
<tr bgcolor="red">
<% for(int j=1;j<=i;j++){
%>
<td><%=i %>*<%=j %>=<%=i*j %> </td><%} %>
</tr>
<%} %>
</table>
<br/>
<table>
<%
int q = Integer.valueOf(request.getParameter("start"));
int w = Integer.valueOf(request.getParameter("end"));
for(int i=q;i<=w;i++){
out.print("<tr >");
for(int j=1;j<=i;j++){
out.print("<td bgcolor='orange'>");
out.print(i+"*"+j+"="+(i*j)+"\t");
out.print("<td>");
}
out.print("</tr><br/>");
}
%>
</table>
</body>
</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 'Num.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">

1 2  下一页

Tags:Jsp 页面 九九

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接