JSP第三次作业
<%@ page contentType="text/html"%> <%@ page pageEncoding="utf-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <body bgcolor=#238E23> <p> <br>英文课文</br> <jsp:include page="english.txt"></jsp:include> <br>英文音频</br> <jsp:include page="MyJsp.jsp"></jsp:include> </p> </body> </html> <%@ page contentType="text/html"%> <%@ page pageEncoding="utf-8"%> <html> <body bgcolor=#32CD32> <embed src="english.mp3" autoplay="false"> 课文音频 </embed> </body> </html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body bgcolor=#32CD32> <body> <br>圆形的面积:</br> <jsp:include page="circle.jsp"> <jsp:param value="3" name="r"/></jsp:include> <br>梯形的面积:</br> <jsp:include page="tixing.jsp"> <jsp:param value="2" name="a"/> <jsp:param value="3" name="b"/> <jsp:param value="4" name="h"/></jsp:include> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <% String r=request.getParameter("r"); double r1=Double.parseDouble(r); double area=3.14*r1*r1; out.print(area); %> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <% String a=request.getParameter("a"); double a1=Double.parseDouble(a); String b=request.getParameter("b"); double b1=Double.parseDouble(b); String h=request.getParameter("h"); double h1=Double.parseDouble(h); double area=(a1+b1)*h1/2; out.print(area); %> </body> </html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <table border="1" align="center" bgcolor="#23CD23"> <tr align="center"> <td colspan="2"><%@include file="a.jsp"%></td> </tr> <tr align="center"> <td><%@include file="b.jsp"%></td> <td><%@include file="c.jsp"%></td> </tr> <tr align="center"> <td colspan="2"><%@include file="d.jsp"%></td> </tr> </table> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%="top.jsp的文件内容包含在这里 "%> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%="left.jsp的文件内容包含在这里 "%> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%="main.jsp的文件内容包含在这里"%> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%="end.jsp的文件内容包含在这里 "%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <html> <head> <title>index</title> </head> <body> <% int i= (int)Math.round(Math.random()*10); if(i%2==0){ %> <jsp:forward page="index.jsp"> <jsp:param value="<%=i %>" name="r"/> </jsp:forward> <% }else{ %> <jsp:forward page="MyJsp.jsp"> <jsp:param value="<%=i %>" name="r"/> </jsp:forward> <% } %> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <% String s=request.getParameter("r"); int a=Integer.parseInt(s); out.println("随机数是"+a); %> <h1>我是一个偶数</h1> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <% String s=request.getParameter("r"); int a=Integer.parseInt(s); out.println("随机数是"+a); %> <h1>我是一个奇数</h1> </body> </html>
posted on 2022-04-03 21:35 chenyulin11 阅读(7) 评论(0) 编辑 收藏 举报