• Jsp第三次作业


    <%@ 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=utf-8">
    <title>Insert title here</title>
    </head>
    <body>
        <jsp:include page="yuan.jsp">
            <jsp:param name="banJing" value="1" />
        </jsp:include>
        <br>
        <jsp:include page="ti.jsp">
            <jsp:param value="10" name="shang" />
            <jsp:param value="5" name="xia" />
            <jsp:param value="15" name="gao" />
        </jsp:include>
    </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=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 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=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>

  • 相关阅读:
    CSS3自定义滚动条样式 -webkit-scrollbar
    仿flash的文字动画效果
    使用PowerDesigner导出MySQL数据库建模
    将博客搬至CSDN
    centos6.3安装MySQL 5.6(转)
    # mysql -u root -p -bash: mysql: command not found
    win8设置保护眼睛的颜色
    网关末尾要么是1要么是254
    虚机centos和本机Windows之间文件的拷贝无法用xftp时用FileZilla也行
    Java基础知识总结之基础数据类型
  • 原文地址:https://www.cnblogs.com/gjm717/p/12553918.html
Copyright © 2020-2023  润新知