ont></a> </font></td></tr></table></td></tr></table>"
end sub
‘同意条约后进入下一个注册画面,注册画面的主要代码:请看[附件1]
‘如果[用户名]为空则显示错误信息,同时跳出下列子程序
function check()
{
if(checkspace(document.userinfo.username.value)) {
document.userinfo.username.focus();
alert("用户名不能为空,请重新输入!");
return false;
},
‘如果[用户名]有所输入,但是输入的长度小于四,则会跳出:
if(checkspace(document.userinfo.username.value) || document.userinfo.username.value.length < 4) {
document.userinfo.username.focus();
alert("用户名长度不能小于4,请重新输入!");
return false;
‘如果没有输入密码,或者密码的长度<6则会跳出:
if(checkspace(document.userinfo.userpassword.value) || document.userinfo.userpassword.value.length < 6) {
document.userinfo.userpassword.focus();
alert("密码长度不能小于6,请重新输入!");
return false;
‘如果输入密码后,没有输入[确认密码]则会跳出:
if(document.userinfo.userpassword.value != document.userinfo.userpassword1.value) {
document.userinfo.userpassword.focus();
document.userinfo.userpassword.value = '';
document.userinfo.userpassword1.value = '';
alert("两次输入的密码不同,请重新输入!");
return false;
确定后[输入密码]处的密码清空,其它不变
‘如果没有输入[Email]地址或者少了“@”字样,则会出现“Email地址格式不正确”跳出:
if(document.userinfo.useremail.value.length!=0)
{
if (document.userinfo.useremail.value.charAt(0)=="." ||
document.userinfo.useremail.value.charAt(0)=="@"||
document.userinfo.useremail.value.indexOf('@', 0) == -1 ||
document.userinfo.useremail.value.indexOf('.', 0) == -1 ||
document.userinfo.useremail.value.lastIndexOf("@")==document.userinfo.useremail.value.length-1 ||
document.userinfo.useremail.value.lastIndexOf(".")==document.userinfo.useremail.value.length-1) {
alert("Email地址格式不正确!");
document.userinfo.useremail.focus();
return false;
}}
else
{
alert("Email不能为空!");
document.userinfo.useremail.focus();
return false;
}}
‘如果正确填写完后,显示恭喜成功页面,并且返回首页
response.Write "<table width=776 border=0 align=center cellpadding=0 cellspacing=1 bgcolor=#D0E2FD><tr><td height=100 bgcolor=#FFFFFF>"
response.Write "<table width=90% border=0 align=center cellpadding=0 cellspacing=0><tr><td height=80 bgcolor=#EFF5FE class=pad><font color=#cb6f00>用户注册成功</font><br>"
response.Write "恭喜"&request.Cookies("bookshop")("username")&",您已注册成为《"&webname&"》正式用户,请进行下一步操作:<br>"
response.Write "·<a href=myuser.asp?action=shouhuoxx>填写收货人详细资料</a><br>·<a href=index.
ASP网上购书(六)相关范文