forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreg.jsp
More file actions
95 lines (94 loc) · 3.42 KB
/
reg.jsp
File metadata and controls
95 lines (94 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<html>
<head>
<title>JSP for DynaActionForm form</title>
<script type="text/javascript">
function checkInput(){
if(document.userLoginForm.loginName.value==null||document.userLoginForm.loginName.value==""){
alert("用户名不能为空");
document.userLoginForm.loginName.focus();
return false;
}
if(document.userLoginForm.pwd.value==null||document.userLoginForm.pwd.value==""){
alert("用户密码不能为空!");
document.userLoginForm.pwd.focus();
return false;
}
if(document.userLoginForm.pwd1.value==null||document.userLoginForm.pwd1.value==""){
alert("确认密码不能为空!");
document.userLoginForm.pwd1.focus();
return false;
}
if(document.userLoginForm.pwd.value!=document.userLoginForm.pwd1.value){
alert("两次输入的密码不一致!");
document.userLoginForm.pwd.focus();
return false;
}
if(document.userLoginForm.mail.value==null||document.userLoginForm.mail.value==""){
alert("电子邮箱不能为空!");
document.userLoginForm.mail.focus();
return false;
}
return true;
}
</script>
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="955">
<tr>
<td colspan="2" background="images/topNo.jpg" height="243"> </td>
</tr>
<tr>
<td height="24" colspan="2"> </td>
</tr>
<tr>
<td width="27" valign="middle"> <img src="images/jiantou.jpg" width="15" height="17" /></td>
<td width="928" valign="middle"><span class="STYLE1">当前位置:</span>新用户注册</td>
</tr>
<tr>
<td height="24" colspan="2"> </td>
</tr>
<tr>
<td colspan="2" height="200">
<html:form action="/reg.do" onsubmit="return checkInput()" >
<table width="600" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c2d3b0">
<tr>
<td height="24" colspan="3" align="center" bgcolor="#FFFFFF" class="STYLE1">${error}</td>
</tr>
<tr>
<td width="110" bgcolor="#FFFFFF" class="td0">用户名:</td>
<td width="266" bgcolor="#FFFFFF"> <html:text property="loginName"/></td>
<td width="220" bgcolor="#FFFFFF" class="STYLE2"> 系统登录帐号6-10位英文字符或数字</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="td0">密码:</td>
<td bgcolor="#FFFFFF"> <html:password property="pwd"/></td>
<td bgcolor="#FFFFFF" class="STYLE2"> 登录密码6-10位英文字符或数字</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="td0">确认密码:</td>
<td bgcolor="#FFFFFF"> <html:password property="pwd1"/></td>
<td bgcolor="#FFFFFF" class="STYLE2"> 验证登录密码</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="td0">电子邮箱:</td>
<td bgcolor="#FFFFFF"> <html:text property="mail"/></td>
<td bgcolor="#FFFFFF" class="STYLE2"> 请输入电子邮箱地址</td>
</tr>
<tr>
<td height="24" colspan="3" align="center" bgcolor="#FFFFFF">
<html:submit value="注册"/> <html:reset value="重置"/>
</td>
</tr>
</table>
</html:form>
</td>
</tr>
<tr>
<td colspan="2" background="images/bottomM.gif" height="87"> </td>
</tr>
</table>
</body>
</html>