模仿Taobao购物网
源代码在线查看: user_update.jsp~84~
String userName = (String)session.getValue("username");
MemberBean memberBean = memberInfo_Bean.isIsselect(userName);
%>
飞梦通信:修改个人信息
.red {color: #FF0000; font-size: 20px; }
.r {background:#EBEBE4}
-->
function pd_form () {
var name=document.form1.name.value;
var password=document.form1.password.value;
var qrpassword=document.form1.qrpassword.value;
var trueName=document.form1.trueName.value;;
var phonecode=document.form1.phonecode.value;;
var emails=document.form1.emails.value;;
var city=document.form1.city.value;;
var address=document.form1.address.value;;
var postCode=document.form1.postCode.value;;
//var hyAdvancePayment=document.form1.hyAdvancePayment.value;;
//var hyLoadDate=document.form1.hyLoadDate.value;;
if(name == "") {
alert("请填写会员注册姓名!");
document.form1.name.focus();
return false;
}
else if(!isNaN(name)) {
alert("姓名不能为数字!");
document.form1.name.focus();
return false;
}else if(password == "") {
alert("请输入密码!");
document.form1.password.focus();
return false;
}else if(password.length alert("密码不能少于6位数字!");
document.form1.password.focus();
return false;
}else if(qrpassword == ""){
alert("请输入确认会员密码!");
document.form1.qrpassword.focus();
return false;
}else if(qrpassword != password){
alert("确认会员密码和会员密码要一致!");
document.form1.qrpassword.focus();
return false;
}else if(trueName == ""){
alert("请输入会员真实姓名!")
document.form1.trueName.focus();
return false;
}else if(!isNaN(trueName)) {
alert("姓名不能为数字!");
document.form1.trueName.focus();
return false;
}else if(phonecode == ""){
alert("请输入会员的电话/手机号码!");
document.form1.phonecode.focus();
return false;
}else if(isNaN(phonecode)){
alert("电话/手机号一定为数字!");
document.form1.phonecode.focus();
return false;
}else if(phonecode.length < 11 && phonecode.length alert("请填写有效的电话/手机!包括区号 /n 电话 如(07714232657)");
document.form1.phonecode.focus();
return false;
}else if(emails == ""){
alert("请输入您的邮箱地址!");
document.form1.emails.focus();
return false;
}else if(emails.indexOf("@",0)==-1){
alert("邮箱格式不正确\n必须包含 @ 符号!");
document.form1.emails.focus();
return false;
}else if(emails.indexOf(".",0)==-1){
alert("邮箱格式不正确\n必须包含 . 符号!");
document.form1.emails.focus();
return false;
}else if(city == "") {
alert("请填写会员所在的城市!");
document.form1.city.focus();
return false;
}else if(!isNaN(city)){
alert("城市不能为数字!");
document.form1.city.focus();
return false;
}else if(address == "") {
alert("请填写会员地址!");
document.form1.address.focus();
return false;
}
else if(postCode.length < 6 || isNaN(postCode)) {
alert("请填写不能少于6位数字的有效邮编!");
document.form1.postCode.focus();
return false;
}else {
return true;
}
}
//-->
String name = memberBean.getName();
if(name == null){
name = "";
}
String sex = memberBean.getSex();
if(sex == null){
sex = "";
}
String trueName = memberBean.getTrueName();
if(trueName == null){
trueName = "";
}
String phonecode =memberBean.getPhoneCode();
if(phonecode == null){
phonecode = "";
}
String emails = memberBean.getEmails();
if(emails == null){
emails = "";
}
String city =memberBean.getCity();
if(city == null){
city = "";
}
String address = memberBean.getAddress();
if(address == null){
address = "";
}
String postCode = memberBean.getPostCode();
if(postCode == null){
postCode = "";
}
%>
修改个人信息
用 户 名:
会 员 性 别:
会 员 密 码:
*
确认会员密码:
*
会员真实姓名:
会员电话号码:
会员Email地址:
*
会员所在城市:
会 员 住 址:
会 员 邮 编: