• JSP 第三次作业


    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
    
      </head>
       
      <body>
        <jsp:include page="circle.jsp" flush="true">
        <jsp:param  name="right" value="5"/>
        </jsp:include>
        <br>
        <jsp:include page="ladder.jsp">
        <jsp:param value="2" name="shang"/>
        <jsp:param value="3" name="xia"/>
        <jsp:param value="1.5" name="high"/>
        </jsp:include>
         
      </body>
    </html>
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
    
      </head>
       
      <body>
      <%
      String a=request.getParameter("right");
      double b=Double.parseDouble(a);
      double pi=3.14;
      out.print("圆的面积为:"+(pi*b*b));
       %>
      </body>
    </html>
    

      

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
      </head>
       
      <body>
      <%
      String a=request.getParameter("shang");
      String b=request.getParameter("xia");
      String c=request.getParameter("high");
      double d=Double.parseDouble(a);
      double e=Double.parseDouble(b);
      double f=Double.parseDouble(c);
      out.print("梯形面积为:"+((d+e)*f/2));
       %>
        <br>
      </body>
    </html>
    

      

  • 相关阅读:
    [Debug]驱动程序调测方法与技巧
    [内核同步]自旋锁spin_lock、spin_lock_irq 和 spin_lock_irqsave 分析
    ios多线程-GCD基本用法
    用PHP抓取页面并分析
    IOS开发-KVC
    IOS开发-KVO
    JavaScript垃圾回收(三)——内存泄露
    JavaScript垃圾回收(二)——垃圾回收算法
    JavaScript垃圾回收(一)——内存分配
    JavaScript闭包(二)——作用
  • 原文地址:https://www.cnblogs.com/TSHEN/p/12564240.html
Copyright © 2020-2023  润新知