今天分享人口普查系统删除查询前端代码
<%@ page language="java" contentType="text/html; UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html lang="en"> <head> <title>Document</title> </head> <body> <form action="/人口普查系统HtmlJsp/servlet?method=show1" method="POST"> 请输入户主姓名 <input type="text" name="name"><br> <input type="submit" value=查询> </form> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" import="Dao.dao"%> <%@ page language="java" import="java.util.*"%> <%@ page language="java" import="Bean.People"%> <%@ page language="java" import="Servlet.servlet"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>人口登记</title> <style> .a{ margin-top: 20px; } .b{ font-size: 20px; width: 160px; color: white; background-color: greenyellow; } .tb, td { border: 1px solid black; font-size: 22px; } </style> </head> <body> <% People people= (People)request.getAttribute("people"); String name=(String)request.getAttribute("name"); %> <div><table class="tb"> <tr> <td>户主姓名</td> <td>性别</td> <td>身份证号</td> <td>民族</td> <td>受教育程度</td> <td>户别</td> <td>住房类型</td> <td>住房面积</td> <td>住房间数</td> </tr> <tr> <td><%=people.getName()%></td> <td><%=people.getSex()%></td> <td><%=people.getIdcard()%></td> <td><%=people.getNation()%></td> <td><%=people.getEducation()%></td> <td><%=people.getHubie()%></td> <td><%=people.getType()%></td> <td><%=people.getSpare()%></td> <td><%=people.getNumber()%></td> </tr> </table> </div> <div> <a href= "/人口普查系统HtmlJsp/servlet?method=delete&idcard=<%=people.getIdcard()%>">删除 </a> </div> </body> </html>
查询
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <form action="/人口普查系统HtmlJsp/servlet?method=show" method="POST"> 请输入户主姓名 <input type="text" name="name"><br> <input type="submit" value=查询> </form> </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> <style> .a{ margin-top: 20px; } .b{ font-size: 20px; width: 160px; color: white; background-color: greenyellow; } </style> </head> <body> <div align="center"> <h1 style="color: cyan;">信息查询</h1> <form action="/人口普查系统HtmlJsp/servlet?method=Serach" method="post" onsubmit="return check()"> <div class="a"> 房主姓名:<input type="text" name="name"/> </div> <div class="a"> <label>性别:</label> <input type="radio" name="sex" value="男"/>男 <input type="radio" name="sex" value="女"/>女 </div> <div class="a"> 民族<input type="text" name="nation"/> </div> <div class="form-group"> <label for="address">受教育程度:</label> <select name="education" class="form-control" id="address"> <option value=" ">无</option> <option value="研究生">研究生</option> <option value="大学本科">大学本科</option> <option value="大学专科">大学专科</option> <option value="高中">高中</option> <option value="初中">初中</option> <option value="小学">小学</option> <option value="未上过学">未上过学</option> </select> </div> <div class="a"> <button type="submit" class="b">查 询</button> </div> <div class="a"> <a href="index.jsp" >返回</a> </div> </form> </div> </body> </html>