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

    <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta 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>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    String a = request.getParameter("shang");
    String b = request.getParameter("xia");
    String c = request.getParameter("gao");
    double shang = Double.parseDouble(a);
    double xia = Double.parseDouble(b);
    double gao = Double.parseDouble(c);
    out.print("梯形面积为:" + ((shang + xia) * gao / 2));
    %>
    </body>
    </html>

    <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <jsp:include page="circle.jsp">
    <jsp:param name="banJing" value="2" />
    </jsp:include>
    <br>
    <jsp:include page="ladder.jsp">
    <jsp:param value="4" name="shang" />
    <jsp:param value="7" name="xia" />
    <jsp:param value="3" name="gao" />
    </jsp:include>
    </body>
    </html>

  • 相关阅读:
    WebService 创建
    SAP WebService 概览
    Web Dynpro 架构
    Web Dynpro 配置
    ALE 概览
    Web Dynpro 概览
    IDOC 概览
    WebService 调用
    Windows Server 2016 域控制器搭建NTP服务,并分发NTP策略
    在ESXi 7.0中安装 MacOS Monterey
  • 原文地址:https://www.cnblogs.com/369236941jp/p/12557755.html
Copyright © 2011-2022 走看看