📄 user.asp
字号:
if (name.length<1) {
alert("你所输入的昵称太短,至少也要输入 1 个字符");
theform.name.focus();
return false;
}
if (name.length>8) {
alert("你所输入的昵称太长,最多只能输入 8 个字符");
theform.name.focus();
return false;
}
if (theform.email.value=="") {
alert("请输入 Email 地址!");
theform.email.focus();
return false;
}
if (theform.email.value.indexOf("@") == -1) {
alert("请输入正确的 Email 地址");
theform.email.focus();
return false;
}
if (theform.email.value!=theform.email2.value) {
alert("两次输入的Email不相同,请确认并重新输入!");
theform.email.focus();
return false;
}
if (theform.password.value=="") {
alert("请输入登陆密码!");
theform.password.focus();
return false;
}
var password=theform.password.value;
if (password.length<6) {
alert("你所输入的密码太短,至少也要输入 6 个字符");
theform.password.value="";
theform.password2.value="";
theform.password.focus();
return false;
}
if (password.length>18) {
alert("你所输入的密码太长,最多只能输入 18 个字符");
theform.password.value="";
theform.password2.value="";
theform.password.focus();
return false;
}
if (theform.password.value!=theform.password2.value) {
alert("两次输入的密码不相同,请确认并重新输入!");
theform.password.value="";
theform.password2.value="";
theform.password.focus();
return false;
}
if (theform.question1.value=="") {
alert("请输入的第一组密码提示问题!");
theform.question1.focus();
return false;
}
var question1=theform.question1.value;
if (question1.length<6) {
alert("你所输入的第一组密码提示问题太短,至少也要输入 6 个字符");
theform.question1.focus();
return false;
}
if (question1.length>30) {
alert("你所输入的第一组密码提示问题太长,最多只能输入 30 个字符");
theform.question1.focus();
return false;
}
if (theform.answer1.value=="") {
alert("请输入的第一组密码提示问题答案!");
theform.answer1.focus();
return false;
}
var answer1=theform.answer1.value;
if (answer1.length<6) {
alert("你所输入的第一组密码提示问题答案太短,至少也要输入 6 个字符");
theform.answer1.focus();
return false;
}
if (answer1.length>20) {
alert("你所输入的第一组密码提示问题答案太长,最多只能输入 20 个字符");
theform.answer1.focus();
return false;
}
if (theform.question2.value=="") {
alert("请输入的第二组密码提示问题!");
theform.question2.focus();
return false;
}
var question2=theform.question2.value;
if (question2.length<6) {
alert("你所输入的第二组密码提示问题太短,至少也要输入 6 个字符");
theform.question2.focus();
return false;
}
if (question2.length>30) {
alert("你所输入的第二组密码提示问题太长,最多只能输入 30 个字符");
theform.question2.focus();
return false;
}
if (theform.answer2.value=="") {
alert("请输入的第二组密码提示问题答案!");
theform.answer2.focus();
return false;
}
var answer2=theform.answer2.value;
if (answer2.length<6) {
alert("你所输入的第二组密码提示问题答案太短,至少也要输入 6 个字符");
theform.answer2.focus();
return false;
}
if (answer2.length>20) {
alert("你所输入的第二组密码提示问题答案太长,最多只能输入 20 个字符");
theform.answer2.focus();
return false;
}
<%if WebUserLOCKNum=1 then%>
if (theform.randm1.value=="") {
alert("请输入验证码!");
theform.randm1.focus();
return false;
}
if (theform.randm1.value!=theform.randm2.value) {
alert("验证码输入错误,请确认并重新输入!");
theform.randm1.value="";
theform.randm1.focus();
return false;
}
<%end if%>
}
//-->
</script>
<input class="button" type="submit" value="提交申请" name="submit">
<input class="button" type="reset" value="重置表单" name="reset">
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<%else Response.Write ("<script>alert(' 操作错误!\n\n 本站暂时禁止会员注册,详情请查看公告。');history.back();</script>")
Response.end
End If
end sub%>
<!-------------------------------------------------------------------------------------->
<%Sub regpost()
if WebUser=0 then
dim UserName,Names,Password,password2,Question1,Answer1,Question2,Answer2,Usermail,Usermail2,usersex,homepage,QQ,msn,address,tel,zip
Names=trim(request("Name"))
UserName=trim(request("UserName"))
Password=trim(request("Password"))
password2=trim(request("password2"))
Usermail=trim(Request.Form("email"))
Usermail2=trim(Request.Form("email2"))
Question1=trim(Request.Form("Question1"))
Answer1=trim(Request.Form("Answer1"))
Question2=trim(Request.Form("Question2"))
Answer2=trim(Request.Form("Answer2"))
homepage=trim(Request.Form("homepage"))
QQ=trim(Request.Form("QQ"))
MSN=trim(Request.Form("MSN"))
address=trim(Request.Form("address"))
tel=trim(Request.Form("tel"))
zip=trim(Request.Form("zip"))
usersex=trim(Request("usersex"))
if Names="" or strLength(Names)>8 then
founderr=true
errmsg=errmsg & "<br><li>请输入昵称!(不能大于8) </li>"
else
if Instr(Names,"=")>0 or Instr(Names,"%")>0 or Instr(Names,chr(32))>0 or Instr(Names,"?")>0 or Instr(Names,"&")>0 or Instr(Names,";")>0 or Instr(Names,",")>0 or Instr(Names,"'")>0 or Instr(Names,",")>0 or Instr(Names,chr(34))>0 or Instr(Names,chr(9))>0 or Instr(Names,"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -