JSP第六周作业
1.
<%-- Created by IntelliJ IDEA. User: 97442 Date: 2022/3/21 Time: 16:13 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>$Title$</title> </head> <body> <img src="mp2/微信图片_20220406105141.png"/> <form action="audio.jsp" method="post"> 用户名: <input type="text" name="uname" value="zs"><br> 密码: <input type="password" name="upwd" value="123"><br> 确认密码: <input type="password" name="upwd2" value="123"><br> 性别: <input type="radio" name="sex" checked="checked" value="男">男 <input type="radio" name="sex" value="女">女<br> 电子邮件地址:<input type="password"name="Email" value="2298499430@qq.com">请输入正确的Email地址<br> 出生日期:<select name="nian"> <option value="1997">1997</option> <option value="1998">1998</option> <option value="1999">1999</option> <option value="2000">2000</option> <option value="2001">2001</option> </select>年 <select name="yue"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select>月 <select name="ri"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="3">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select>日<br> <input type="submit" value="同意以下条款并提交"><br> <textarea rows="5" cols="30"> The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用 The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用The most likely reason is that the file no longer exists, so there is nothing for Ruffle to 最有可能的原因是,该文件已不存在,因此没有任何东西可供Ruffle使用 </textarea> </form> </body> </html>
<%-- Created by IntelliJ IDEA. User: 97442 Date: 2022/3/30 Time: 11:18 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>Title</title> </head> <body> 注册成功!!!您的注册信息是 <% request.setCharacterEncoding("utf-8"); String uname = request.getParameter("uname"); String upwd = request.getParameter("upwd"); String upwd2 = request.getParameter("upwd2"); String sex = request.getParameter("sex"); String Email =request.getParameter("Email"); String nian = request.getParameter("nian"); String yue = request.getParameter("yue"); String ri = request.getParameter("ri"); %> 用户名是:<%=uname%><br>密码是<%=upwd%><br> 性别<%=sex%> <br> 电子邮件:<%=Email%><br>出生日期:<%=nian%><%=yue%><%=ri%> </body> </html>
2.
<%-- Created by IntelliJ IDEA. User: 97442 Date: 2022/3/21 Time: 16:13 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>$Title$</title> </head> <body> <form action="audio.jsp" method="post"> 求平均值:<br> 姓名:<input type="text" name="uname" /><br> 性别:<input type="radio" name="sex" value="男" />男 <input type="radio" name="sex" value="女" />女<br> 班级:<select name="class"> <option value="计算机1904">计算机1904</option> <option value="计算机1905">计算机1905</option> </select><br> 语文:<input type="text" name="chinese" /><br> 数学:<input type="text" name="math" /><br> 英语:<input type="text" name="english" /><br> <input type="submit" value="提交" /> <input type="reset" value="重置" /> </form> </body> </html>
<%-- Created by IntelliJ IDEA. User: 97442 Date: 2022/3/30 Time: 11:18 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>Title</title> </head> <body> <% request.setCharacterEncoding("utf-8"); String name=request.getParameter("uname"); String sex=request.getParameter("sex"); String cla=request.getParameter("class"); String chinese=request.getParameter("chinese"); String math=request.getParameter("math"); String english=request.getParameter("english"); double x=Double.parseDouble(chinese); double y=Double.parseDouble(math); double z=Double.parseDouble(english); double ave=(x+y+z)/3; out.print("您好!"+cla+"的"+name+"同学!"+"<br>"+"性别:"+sex+"<br>"+"您各科的平均分数是:"+ave); %> </body> </html>