隐藏页面特效

1011day-人口普查系统

1、Browse.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="com.edu.ia.DBUtil" %>
<%@page import = "java.sql.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<%
String sql="select * from test";
Connection conn= DBUtil.getConnection();
PreparedStatement papre=conn.prepareStatement(sql);
ResultSet rs=papre.executeQuery();
while(rs.next()){
out.println(rs.getString("hubie")+" &nbsp "+rs.getString("zhufang")+" &nbsp "+rs.getString("mianji")+" &nbsp "+rs.getString("fangjianshu")+" &nbsp "+rs.getString("name")+" &nbsp "+rs.getString("ID")+" &nbsp "+rs.getString("sex")+" &nbsp "+rs.getString("nation")+" &nbsp "+rs.getString("educator")+" &nbsp ");
out.print("<br />");
}
%>
<form>
<table align="center" border="1">
<tr>
<td>
<input type="submit" formaction="select.jsp" value="返回">
</td>
</tr>
</table>
</form>
</body>
</html>

 

2、Change.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<form action="update.jsp">
<table align = "center" border = "1">
<tr>
<td>请输入要修改的户主名称:</td>
<td>
<input type="text" name="name">
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" value="确定">
</td>
</tr>
</table>
</form>
</body>
</html>

 

3、delete.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="com.edu.ia.DBUtil" %>
<%@page import = "java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<%
String sql="select * from people";
Connection conn= DBUtil.getConnection();
PreparedStatement papre=conn.prepareStatement(sql);
ResultSet rs=papre.executeQuery();
String n=request.getParameter("name");
boolean s=true;
session.setAttribute("name",n);
while(rs.next()){
if(n.equals(rs.getString("name"))){
out.println(rs.getString("hubie")+" &nbsp "+rs.getString("zhufang")+" &nbsp "+rs.getString("mianji")+" &nbsp "+rs.getString("fangjianshu")+" &nbsp "+rs.getString("name")+" &nbsp "+rs.getString("ID")+" &nbsp "+rs.getString("sex")+" &nbsp "+rs.getString("nation")+" &nbsp "+rs.getString("educator")+" &nbsp ");
out.print("<br />");
s=false;
}
}
%>
<form action="shanchu">
<table align = "center" border = "1">
<tr>
<td>请再次输入要删除的户主名称:</td>
<td>
<input type="text" name="name">
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" value="确定">
</td>
</tr>
</table>
</form>
</body>
</html>

 

4、educator.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>
<form action="shuchu.jsp" method="get">
<table>
<tr>
<td>受教育程度</td>
<td>
<input type="text" name="educator" list="elist">
<datalist id="elist">
<option>研究生</option>
<option>大学本科</option>
<option>大学专科</option>
<option>高中</option>
<option>初中</option>
<option>小学</option>
<option>未上过学</option>
</datalist>
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" value="确定">
</td>
</table>
</form>
</body>
</html>

 

5、ErrorPage.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>
<h1>数据库内无此信息</h1>
<form action="select.jsp" method="get">
<input type="submit" value="返回">
</form>
</body>
</html>

 


__EOF__

本文作者往心。
本文链接https://www.cnblogs.com/lx06/p/14165089.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是博主的最大动力!
posted @   往心。  阅读(71)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类
点击右上角即可分享
微信分享提示