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>

  • 相关阅读:
    编译KlayGE所需要的第三方库和工具下载
    KlayGE启用顶级域名
    Sophus和Eigen 李群李代数 简单介绍
    G2O曲线拟合1
    梯度下降
    PCL1.8单张图点云转换显示
    双目测距demo
    Kinect基于微软SDK彩图与深度图对齐
    单例模式
    zendstudio卡死
  • 原文地址:https://www.cnblogs.com/369236941jp/p/12557755.html
Copyright © 2011-2022 走看看