?? doctors.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;
}
#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-family: "宋體";
color: #000000;
font-size: 24px;
font-weight: bold;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>
<jsp:useBean id="Rs" scope="page" class="MyWeb.db.DBManager" />
<%
//String DID=null;
//String Name=null;
//String keshi=null;
//int Age=0;
//int Sex=0;
String Phone = null;
ResultSet rs = null;
String sql = null;
sql = "select * from doctor";
try {
rs = Rs.executeQuery(sql);
} catch (Exception e) {
e.printStackTrace();
}
%>
<body>
<table width="550" border="1" align="center">
<tr bgcolor="#BEC798">
<td height="45">
<div align="center" class="STYLE5">
所有醫生資料
</div>
</td>
</tr>
</table>
<p>
<%
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;
//if(rs.getShort("Sex")==1) sex="女";else sex="男";
out.println("<tr><td>" + rs.getString(1) + "<td>"
+ rs.getString(2) + "<td>" + rs.getString(3) + "<td>"
+ rs.getString(4) + "<td>" + rs.getString(5) + "<td>"
+ rs.getInt(6) + "</tr>");
}
out.println("</table>");
%>
<center>
<input name="textarea" type="submit"
onclick="MM_goToURL('parent','main.jsp');return document.MM_returnValue"
value="返回">
</center>
<hr />
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -