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> <div> <form action="main.jsp"> <input type="number" id="cs1" name="R" placeholder="请输入圆的半径"> <input type="submit" value="确定"> </form> </div> <% String R=request.getParameter("R"); if(R!=null){ double cr=Double.parseDouble(R); double cs=cr*cr*3.14; out.print("输入圆的半径为:"+cr+"。得出圆的面积为"+cs); request.setAttribute("cr", cr); request.setAttribute("cs", cs); } %> </body> </html> <%@ page language="java" contentType=