⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 30a832d39ebc001d1a0bdb0e07cbdb75

📁 MyEclipse6.0+SQL2000开发简单的通讯录系统
💻
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<jsp:directive.page import="org.DAO.UserinfoDAO" />
<jsp:directive.page import="org.dbUtil.DBUtil" />
<jsp:directive.page import="java.sql.Date" />
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'edit.jsp' starting page</title>
   <style type="text/css">

body {
	background-image: url("<%=basePath%>myapps/picture/dog.jpg");
}
.style1 {color: #9995EC}
.style2 {
	color: #9995EC;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-style: italic;
	font-weight: bold;
	font-size: 50px;
}
.style4 {color: #9995EC; font-size: 18px; }
.style5 {color: #9995EC; font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; font-weight: bold; font-size: 24px; }

</style>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript">
function check(){
var name =  document.forms.editForm.userId.value;
if(name=="")
alert('该字段不能为空');
}

</script>
	</head>

	<body>
		<%
			String id = request.getParameter("id");
            String kn = request.getParameter("kn");
			DBUtil db = new DBUtil();
			UserinfoDAO user = new UserinfoDAO();
			if (id != null) {
				user = db.getUserinfoDAOById(id);
			}
		%>
		<form name="editForm" action="<%=basePath%>servlet/EditServlet?id=<%=user != null ? id : "insert"%> &kn=<%=kn%>"
			method="post">

			<table width="100%" border="1" align="center">
			<tr>&nbsp;</tr>
			<tr>&nbsp;</tr>
			<tr>&nbsp;</tr>
			<tr>&nbsp;</tr>
				<tbody>
					<tr>
						<td>
							员工号
						</td>
						<td>
							<input name="EmployId" type="text"
								value="<%=user != null ? id : kn%>" readonly="readonly">
						</td>
						<td>
							联系电话
						</td>
						<td>
							<input name="EmployTel" type="text" value="<%=user != null ? user.getEmployTel() : ""%>">
						</td>
					</tr>
					<tr>
						
						<td>
							出生日期
						</td>
						<td>
								<input name="EmployBir" type="text" value="<%=user != null ? user.getEmployBir() : ""%>">
						</td>
					</tr>
					<tr>
						<td>
							员工姓名
						</td>
						<td>
							<input name="EmployName" type="text" value="<%=user != null ? user.getEmployName() : ""%>">
						</td>
						<td>
							性别
						</td>
						<td>
							<input name="EmploySex" type="text" value="<%=user != null ? user.getEmploySex() : ""%>">
						</td>
					</tr>
					<tr>
						<td>
							居住街道
						</td>
						<td>
							<input name="EmployStreet" type="text" value="<%=user != null ? user.getEmployStreet() : ""%>">
						</td>
						<td>
							社保号
						</td>
						<td>
							<input name="EmployWel" type="text" value="<%=user != null ? user.getEmployWel() : ""%>">
						</td>
					</tr>
					<tr>
						<td>
							居住城市
						</td>
						<td>
							<input name="EmployCity" type="text" value="<%=user != null ? user.getEmployCity() : ""%>">
						</td>
						<td>
							工资
						</td>
						<td>
							<input name="EmployEarn" type="text" value="<%=user != null ? user.getEmployEarn() : ""%>">
						</td>
					</tr>
					<tr>
						<td>
							居住省份
						</td>
						<td>
							<input name="EmployPro" type="text" value="<%=user != null ? user.getEmployPro() : ""%>">
						</td>
						<td>
							职位
						</td>
						<td>
							<input name="EmployFun" type="text" value="<%=user != null ? user.getEmployFun() : ""%>">
						</td>
					</tr>
					<tr>
						<td>
							居住地邮编
						</td>
						<td>
							<input name="EmployZip" type="text" value="<%=user != null ? user.getEmployZip() : ""%>">
						</td>
						<td>

						</td>
					</tr>
					<tr>
						<td colspan="4" align="center">
							<input type="submit" value="保存" onclick="check()">
							<input type="reset" value="重置">
						</td>
					</tr>

				</tbody>
			</table>
		</form>
	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -