用户注册
用户注册的部分代码
<form name="frmReg" method="POST" action="SaveReg.asp"
onsubmit="javaScript: return validateReg();">
用户账号:<input type="text" name="txtUserID" size="15" maxlength="15">
登录密码:
<input type="password" name="txtPassword" size="15" maxlength="15">
确认密码:
<input type="password" name="txtConfPassword" size="15" maxlength="15">
<input type="submit" value="提 交" name="submit">
客户端数据验证 validateReg.js
<!--
function validateReg(){
var strUserID = document.frmReg.txtUserID.value;
var primeInUserID = strUserID.indexOf("'");
if (strUserID ==""){
alert("请您输入用户账号!");
return false;
}
if (strPassword ==""){
alert("请输入密码!");
return false;
}
if((strPassword.length)<6){
alert("密码最少为6位!")
return false;
}
if (strConfPassword ==""){
alert("请您确认密码!");
return false;
}
if (strPassword != strConfPassword){
alert("两次输入的密码不一致!")
return false;
}
-->