📄 patients.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java"
import="java.sql.*" errorPage=""%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:543px;
height:49px;
z-index:1;
left: 244px;
top: 18px;
}
#Layer2 {
position:absolute;
width:262px;
height:210px;
z-index:2;
left: 244px;
top: 69px;
}
#Layer3 {
position:absolute;
width:110px;
height:201px;
z-index:3;
left: 625px;
top: 85px;
}
#Layer4 {
position:absolute;
width:538px;
height:330px;
z-index:4;
left: 245px;
top: 322px;
}
.STYLE4 {
font-size: 24px;
font-family: "宋体";
font-weight: bold;
color: #000000;
}
#Layer5 {
position:absolute;
width:306px;
height:221px;
z-index:1;
left: 69px;
top: 58px;
background-color: #BEC798;
}
#Layer6 {
position:absolute;
width:165px;
height:160px;
z-index:2;
left: 534px;
top: 95px;
background-color: #BEC798;
}
body {
background-color: #93A070;
}
.STYLE5 {font-size: 16px}
-->
</style>
</head>
<jsp:useBean id="Rs" scope="page" class="MyWeb.db.DBManager" />
<%
String sql = null;
java.sql.ResultSet rs = null;
%>
<%
sql = "select * from patient";
try {
rs = Rs.executeQuery(sql);
} catch (Exception e) {
e.printStackTrace();
}
%>
<body>
<table width="550" border="1" align="center">
<tr bgcolor="#BEC798">
<td height="21" colspan="2">
<div align="center">
<span class="STYLE4">所有病人资料</span>
</div>
</td>
</tr>
<tr bgcolor="#EEEEEE">
<td width="152" height="198">
<table width="100%" height="158" border="0">
<tr>
<td height="66" align="center">
<span class="STYLE5"><a href="BRXX/patientadd.jsp">新建病人资料</a>
</span>
</td>
</tr>
<tr>
<td height="66" align="center">
<span class="STYLE5"><a href="BRXX/patientdel.jsp">删除病人资料</a>
</span>
</td>
</tr>
<tr>
<td height="66" align="center">
<span class="STYLE5"><a href="main.jsp">返回</a>
</span>
</td>
</tr>
</table>
</td>
<td width="382">
<table width="100%" border="0">
<tr>
<td height="66">
编号
<input name="textarea" type="text" value="" size="15" />
</td>
<td>
姓名
<input name="textarea2" type="text" value="" size="15" />
</td>
</tr>
<tr>
<td height="66">
年龄
<input name="textarea3" type="text" value="" size="15" />
</td>
<td>
性别
<input name="textarea4" type="text" value="" size="15" />
</td>
</tr>
<tr>
<td height="66">
地址
<input name="textarea5" type="text" value="" size="15" />
</td>
<td>
电话
<input name="textarea6" type="text" value="" size="15" />
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#BEC798">
<td height="45" colspan="2">
<%
out
.println("<table width=\"550\"border=\"1\" align=\"center\" border=\"1\">");
out.println("<tr><td>编号<td>姓名<td>年龄<td>性别<td>联系电话<td>联系地址</tr>");
while (rs.next()) {
String sex = null;
out.println("<tr><td><a href=\"BRXX/patientdel.jsp?PID="
+ rs.getString("PID") + "\">" + rs.getString("PID")
+ "</a><td>" + rs.getString("Name") + "<td>"
+ rs.getString("Age") + "<td>" + rs.getString("Sex")
+ "<td>" + rs.getString("Phone") + "<td>"
+ rs.getString("Address") + "</tr>");
}
out.println("</table>");
%>
</td>
</tr>
</table>
<hr />
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -