📄 updatemember.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"%>
<jsp:include page="../header.jsp" />
<html:html>
<head>
<title>index.jsp</title>
<script type="text/javascript">
function isnull(){
if(document.updateMemberForm.memberCheckPass.value==""){
alert('会员密码不能为空');
document.updateMemberForm.memberCheckPass.focus();
return false;
}else if(document.updateMemberForm.memberPass.value!=document.updateMemberForm.memberCheckPass.value){
alert('两次密码输入不一致');
document.updateMemberForm.memberPass.focus();
return false;
}
if(document.updateMemberForm.memberTel.value == ""){
return true;
}else{
tele=new RegExp("\\d{3,4}\\-?\\d{7,8}");
flag=document.updateMemberForm.memberTel.value.match(tele);
if(flag==null){
alert("电话号码输入不合法!");
document.updateMemberForm.memberTel.value="";
document.updateMemberForm.memberTel.focus();
return false;
}
if(document.updateMemberForm.memberTel.value.length>13){
alert("电话号码输入不合法!");
document.updateMemberForm.memberTel.value="";
document.updateMemberForm.memberTel.focus();
return false;
}
}
if(document.updateMemberForm.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.updateMemberForm.memberEmail.value.match(tele);
if(flag==null)
{
alert("Email输入不合法!");
document.updateMemberForm.memberEmail.value="";
document.updateMemberForm.memberEmail.focus();
return false;
}
}
}
</script>
</head>
<body>
<center>
<html:form action="/updateMember.do">
<html:hidden property="enrollDate"/>
<html:hidden property="balance"/>
<html:hidden property="memberId"/>
<html:hidden property="levelId"/>
<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" readonly="true"></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>性 别:
</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>
<input type="button" name="cancel" value="取消">
</td>
</tr>
</table>
</html:form>
</center>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -