📄 reg.js
字号:
// JScript 文件
function exsitUserName(arg)
{
if(arg.value!="")
{
var obj=join_aspx.ExsitUser(arg.value);
if(obj.value!="0")
{
alert("该用户名已经存在");
arg.value="";
arg.focus();
}
}
}
function Reg()
{
if(Verify_UnBlank(document.getElementById("userName").value))
{
alert("用户名为空");
return false;
}
if(Verify_UnBlank(document.getElementById("userPwd1").value) && Verify_UnBlank(document.getElementById("userPwd2").value))
{
alert("密码框为空");
return false;
}
else
{
if(document.getElementById("userPwd1").value!=document.getElementById("userPwd2").value)
{
alert("两次密码不一致");
return false;
}
else
{
if(document.getElementById("userPwd1").value.length<6)
{
alert("密码长度太短");
return false;
}
}
}
if(Verify_UnBlank(document.getElementById("contact").value))
{
alert("联系人为空");
return false;
}
if(Verify_Phone(document.getElementById("tel").value))
{
alert("联系电话为空");
return false;
}
document.getElementById("userPwd").value=hex_md5(document.getElementById("userPwd1").value);
document.forms[0].submit();
}
function Verify_Phone(value)
{
var myReg = /^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/;
if(myReg.test(value)) return true;
return false;
}
function Verify_UnBlank(value)
{
var myReg = /^\s*$/;
if(myReg.test(value)) return true;
return false;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -