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

📄 register.jsp

📁 本系统为符合订单管理 精确使用了账号分层用户管理 可进行主订单 次订单的增加 删除功能 实现了全密浏览用品的功能!
💻 JSP
字号:
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>


<html:html>
	<head>
		<title>添加用户</title>
		
		<script type="text/javascript">
			function isnull(){				
				if(document.addMemberForm.memberName.value==""){
					alert('会员名称不能为空');
					document.addMemberForm.memberName.focus();
					return false;
				}else if(document.addMemberForm.memberPass.value==""){
					alert('会员密码不能为空');
					document.addMemberForm.memberPass.focus();
					return false;
				}else if(document.addMemberForm.memberPass.value!=document.addMemberForm.memberCheckPass.value){
					alert('两次密码输入不一致');
					document.addMemberForm.memberPass.focus();
					return false;
				}else if(document.addMemberForm.memberAnswer.value==""){
					alert('提示答案不能为空');
					document.addMemberForm.memberAnswer.focus();
					return false;
				}
				if(document.addMemberForm.memberTel.value == ""){
					return true;
				}else{
					tele=new RegExp("\\d{3,4}\\-?\\d{7,8}");
					flag=document.addMemberForm.memberTel.value.match(tele);
					if(flag==null){
						alert("电话号码输入不合法!");
						document.addMemberForm.memberTel.focus();
						return false;
					}
					if(document.addMemberForm.memberTel.value.length>13){
						alert("电话号码输入不合法!");
						document.addMemberForm.memberTel.focus();
						return false;
					}
				}
			if(document.addMemberForm.memberEmail.value == ""){
				return true;
			}
			else
			{
				tele=new RegExp("[0-9A-Za-z]+@([0-9a-zA-Z]+.){1,2}(com|net|cn|com.cn)");
				flag=document.addMemberForm.memberEmail.value.match(tele);
				if(flag==null)
				{
					alert("Email输入不合法!");
					document.addMemberForm.memberEmail.focus();
					return false;
				}
			}
			
			}
		</script>
		
	</head>
	<logic:notPresent name="addState">
		<jsp:include page="../header.jsp"></jsp:include>
	</logic:notPresent>
	<body bgcolor="#9BD5BF">
		<center>
				<html:form action="/addMember.do">
					<table>
						<caption>
							<font size="5"><b>
								会员注册信息
							</b></font>
						</caption>
						<tr>
							<th align="left">
							登录信息:
							</th>
						</tr>
						<tr>
							<td>
								<table>
									<tr>
										<th width="100" align="center">
											<font size="3" color="red">*</font>会员名称:
										</th>
										<td>
											<html:text property="memberName"></html:text>
										</td>
									</tr>
									<tr>
										<th width="100" align="center">
											 <font size="3" color="red">*</font>会员密码:
										</th>
										<td>
											<html:password property="memberPass"></html:password>
										</td>
									</tr>
									<tr>
										<th width="100" align="center">
											 <font size="3" color="red">*</font>确认密码:
										</th>
										<td>
											<html:password property="memberCheckPass"></html:password>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<th align="left">
							个人信息:
							</th>
						</tr>
						<tr>
							<td>
								<table>
									<tr>
										<th width="100" align="center">
											 <font size="3" color="red">*</font>性&nbsp;&nbsp;&nbsp;&nbsp;别:
										</th>
										<td>
											<html:radio property="memberGender" value="male">男</html:radio>
											<html:radio property="memberGender" value="female">女</html:radio>
										</td>
									</tr>
									<tr>
										<th width="100" align="center">
											 居住地址:
										</th>
										<td>
											<html:text property="memberAddress"></html:text>
										</td>
									</tr>
									<tr>
										<th width="100" align="center">
											 联系电话:
										</th>
										<td>
											<html:text property="memberTel"></html:text>
										</td>
									</tr>
									<tr>
										<th width="100" align="center">
											 E_mail:
										</th>
										<td>
											<html:text property="memberEmail"></html:text>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<th align="left">
							密码保护:
							</th>
						</tr>
						<tr>
							<td>
								<table>
									<tr>
										<th width="100" align="center">
											 <font size="3" color="red">*</font>提示问题:
										</th>
										<td>
											<html:select property="memberQuestion">
												<html:option value="我的爱好">我的爱好</html:option>
												<html:option value="我的家乡">我的家乡</html:option>
												<html:option value="我的一个高中同学名字">我的一个高中同学名字</html:option>
												<html:option value="我最崇拜的人">我最崇拜的人</html:option>
												<html:option value="我的宠物名字">我的宠物名字</html:option>
											</html:select>
										</td>
									</tr>
									<tr>
										<th width="100" align="center">
											 <font size="3" color="red">*</font>提示答案:
										</th>
										<td>
											<html:text property="memberAnswer"></html:text>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<html:submit onclick="return isnull()">注册</html:submit>
								&nbsp;&nbsp;&nbsp;&nbsp;
								<html:reset>重填</html:reset>
							</td>
						</tr>	
					</table>
				</html:form>
		</center>
	</body>
</html:html>

⌨️ 快捷键说明

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