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>

  • 相关阅读:
    C# 调试
    C#添加资源的两种方式
    C# 光标文件的创建
    窗体初始位置
    C# 实现关闭按钮隐藏窗体而不退出
    mac ssd开启trim模式
    iOS打包上传app store各种问题解决总结
    adhoc无法下载应用程序 此时无法安装-解决
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY解决
    Could not load OpenSSL解决
  • 原文地址:https://www.cnblogs.com/lj1221/p/12560604.html
Copyright © 2011-2022 走看看