register.htm
来自「jsp-公司管理系统-注册、会员管理等功能」· HTM 代码 · 共 142 行
HTM
142 行
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>用户注册</title>
</head>
<script language="JavaScript">
function checkData(){
//检查用户名输入是否为空
if(document.registerForm.username.value==""){
alert("请输入您的用户名.");
document.registerForm.username.focus();
return false;
}
//检查用户密码是否为空
if(document.registerForm.password.value==""){
alert("请输入您的密码.");
document.registerForm.password.focus();
return false;
}
//检查用户密码是否小于8位字符
if(document.registerForm.password.value.length<8){
alert("必须输入至少8位以上密码.");
document.registerForm.password.focus();
return false;
}
//检查用户密码是否超过15位字符
if(document.registerForm.password.value.length>15){
alert("密码必须在15位字符以内.");
document.registerForm.password.focus();
return false;
}
//检查两次输入的密码是否一致
if(document.registerForm.password.value!=window.document.registerForm.password2.value){
alert("两次输入的密码不一致.");
document.registerForm.password.focus();
return false;
}
//检查输入的真实姓名是否为空
if(document.registerForm.realname.value==""){
alert("请输入您的真实姓名.");
document.registerForm.realname.focus();
return false;
}
//检查邮件地址是否为空
if(document.registerForm.email.value==""){
alert("请输入您的邮件地址");
document.registerForm.email.focus();
return false;
}
//检查邮件地址是否合法
var email=document.registerForm.email.value;
if(email.indexOf('@',1)==-1){
alert("输入的邮件地址不合法.");
document.registerForm.email.focus();
return false;
}
return true;
}
</script>
<body>
<p align="center"><font face="仿宋_GB2312"><font color="#0000FF">首页</font>|<font color="#0000FF">Java、VC++、Powerbuilder论坛</font>|<font color="#0000FF">Java在线游戏</font>|<font color="#0000FF">VC++
3D游戏</font>|<font color="#0000FF">聊天室</font>|<font color="#0000FF">联系我们</font></font></p>
<hr>
<form method="POST" action="addUser.jsp" name="registerForm" onsubmit="return checkData();">
<div align="center">
<center>
<table border="0" width="458" height="271" style="border-left-style: solid; border-right-style: solid">
<tr>
<td width="458" height="39" bgcolor="#EAF4F4">
<p align="center"><font face="仿宋_GB2312" color="#FF00FF"><b>用户资料填写:</b></font></td>
</tr>
</center>
<tr>
<td width="458" height="15" bgcolor="#FFECD9">
<p align="left"><font face="仿宋_GB2312">用户名:<input type="text" name="username" size="25"></font></td>
</tr>
<tr>
<td width="458" height="22" bgcolor="#FFECD9">
<p align="left"><font face="仿宋_GB2312">密码:<input type="password" name="password" size="34"></font></td>
</tr>
<center>
<tr>
<td width="458" height="15" bgcolor="#FFECD9"><font face="仿宋_GB2312">请确认密码:<input type="password" name="password2" size="34"></font></td>
</tr>
<tr>
<td width="458" height="19" bgcolor="#FFECD9"><font face="仿宋_GB2312">真实姓名:<input type="text" name="realname" size="20"></font></td>
</tr>
<tr>
<td width="458" height="18" bgcolor="#FFECD9"><font face="仿宋_GB2312">性别:<input type="radio" value="1" checked name="sex">男
<input type="radio" name="sex" value="0">女</font></td>
</tr>
<tr>
<td width="458" height="17" bgcolor="#FFECD9"><font face="仿宋_GB2312">年龄:<select size="1" name="age">
<option selected>18岁以下</option>
<option>18-22</option>
<option>22-35</option>
<option>35-45</option>
<option>45岁以上</option>
</select></font></td>
</tr>
<tr>
<td width="458" height="22" bgcolor="#FFECD9"><font face="仿宋_GB2312">所在地区:<select size="1" name="region">
<option>北京</option>
<option>上海</option>
<option>深圳</option>
</select></font></td>
</tr>
<tr>
<td width="458" height="16" bgcolor="#FFECD9"><font face="仿宋_GB2312">email:<input type="text" name="email" size="46"></font></td>
</tr>
<tr>
<td width="458" height="21" bgcolor="#FFECD9"><font face="仿宋_GB2312">教育程度:<select size="1" name="education">
<option>硕士</option>
<option>博士</option>
<option>本科</option>
</select></font></td>
</tr>
<tr>
<td width="458" height="17" bgcolor="#FFECD9"><font face="仿宋_GB2312">婚否:<input type="radio" name="marriage" value="1" checked>已婚
<input type="radio" name="marriage" value="0">未婚</font></td>
</tr>
<tr>
<td width="458" height="17" bgcolor="#FFECD9">
<p align="center"><input type="submit" value="提交资料" name="B1">
<input type="reset" value="重置" name="B2"></td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?