📄 add.jsp
字号:
<%@ page language="java" import="java.util.ArrayList,com.buat.hr.users.User,com.buat.hr.users.UserDao" pageEncoding="GB18030"%>
<html>
<head>
<script type="text/javascript" src="..\\meizzDate.js"></script>
<script type="text/javascript">
function test(){
if(document.login.username.value=="" ){
window.alert("用户名不能为空!!!");
return false;
}
if(document.login.passwords.value=="" ){
window.alert("密码不能为空!!!");
return false;
}else{
if(document.login.repws.value=="" ){
window.alert("确认密码不能为空!!!");
return false;
}
if(document.login.passwords.value!=document.login.repws.value){
window.alert("两次输入的密码不一致!!!");
return false;
}
}
if(document.login.passwords.value.length>8 || document.login.repws.value.length>8){
window.alert("密码最大长度为8!!!");
return false;
}
if(document.login.passwords.value.length<3 || document.login.repws.value.length<3){
window.alert("密码最小长度为3!!!");
return false;
}
if(document.login.birthday.value==""){
window.alert("出生日期不能为空!");
return false;
}
if(document.login.introduce.value==""){
window.alert("用户简介不能为空!");
return false;
}
document.login.action="ProcessAdd.jsp";
document.login.submit();
}
</script>
</head>
<body background="../bg.jpg">
<form name="login" action="Add.jsp" ENCTYPE="multipart/form-data" method="post">
<table width="90%" border="1" align="center">
<tr>
<td colspan="2"><font color="red">添加人员信息</font></td>
</tr>
<tr>
<th>用户名称:</th>
<td><input type="text" name="username" > </td>
</tr>
<tr>
<th>用户密码:</th>
<td><input type="password" name="passwords"></td>
</tr>
<tr>
<th>确认密码:</th>
<td><input type="password" name="repws"></td>
</tr>
<tr>
<th>用户性别:</th>
<td><input type="radio" name="gender" value="male" checked>男
<input type="radio" name="gender" value="female">女</td>
</tr>
<tr>
<th>出生日期:</th>
<td><input type="text" name="birthday" onClick="setday(this)" value="" ></td>
</tr>
<tr>
<th>用户级别:</th>
<td><select name="isadmin">
<option value="superAdmin">超级管理员
<option value="interviewerAdmin">招聘管理员
<option value="educateAdmin">培训管理员
<option value="institutionAdmin">奖惩管理员
<option value="stipendAdmin">薪金管理员
<option value="employeeAdmin">员工管理员
<option value="departAdmin">部门管理员
<option value="commonAdmin" selected>普通用户
</select>
</td>
</tr>
<tr>
<th>用户照片: </th>
<td><input type="file" name="pic"></td>
</tr>
<tr>
<th>用户简介: </th>
<td><textarea name="introduce" rows="5" cols="30"></textarea></td>
</tr>
<tr>
<th colspan="2" align="center"><input type="submit" value="提交" onclick="test()">
<input type="reset" value="重置"></th>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -