zoukankan      html  css  js  c++  java
  • JSP第三周作业

    <%@ page language="java" contentType="text/html; charset=utf-8"
        pageEncoding="utf-8"%>
    <!DOCTYPE html >
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    </head>
    <body>
    <jsp:include page="circle.jsp">
      <jsp:param name="banjing"  value="4"/>
      </jsp:include>
      <br>
    <jsp:include page="ladder.jsp">
      <jsp:param name="shang"  value="6"/>
      <jsp:param name="xia"  value="8"/>
      <jsp:param name="high"  value="7"/>
      </jsp:include>
    </body>
    </html>
    <%@ page language="java" contentType="text/html; charset=utf-8"
        pageEncoding="utf-8"%>
    <!DOCTYPE html >
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    </head>
    <body>
      <%
      String banjing = request.getParameter("banjing");
      double r=Double.parseDouble(banjing);
      double pai=3.14;
      out.print("圆的面积为:"+(pai*r*r));
       %>
    </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=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <% 
    String shang = request.getParameter("shang");
    String xia = request.getParameter("xia");
    String high = request.getParameter("high");
    double a=Double.parseDouble(shang);
    double b=Double.parseDouble(xia);
    double c=Double.parseDouble(high);
    out.print("梯形的面积是:"+((a+b)*c)/2);
    %>
    </body>
    </html>

  • 相关阅读:
    python06
    python05
    Python02
    pythonday01
    python04
    Mac下如何安装pip
    更改pip源至国内镜像,显著提升下载速度
    login登录加密
    虚拟机安装Centos6.5之后的网络配置
    git常用的问题
  • 原文地址:https://www.cnblogs.com/lj1221/p/12560604.html
Copyright © 2011-2022 走看看