人口資訊普查系統-JavaWeb-五
阿新 • • 發佈:2021-11-02
今天分享人口普查系統刪除查詢前端程式碼
<%@ 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>