📄 checkreg.js
字号:
function reg_person_step1()
{
var theForm = document.regform;
if(theForm.username.value=='')
{
alert('请先输入您的用户名!');
theForm.username.focus();
return false;
}
else
{
var s = theForm.username.value;
var patrn=/^[a-zA-Z]{1}([a-zA-Z0-9]|[_]){3,15}$/;
if(!patrn.exec(s))
{
alert('用户名只能由英文字母(a-z),数字(0-9)和下划线("_")构成,不能有空格,且必须以英文字母开头。');
theForm.username.focus();
return false;
}
}
return true;
}
function reg_person_step2()
{
var theForm = document.regform;
if(theForm.pwd.value=='')
{
alert('请先输入您的密码!');
theForm.pwd.focus();
return false;
}
if(theForm.pwd.value.indexOf('\'')>=0)
{
alert('您的密码中含有非法字符,请重新输入!');
theForm.pwd.focus();
return false;
}
if(theForm.pwd2.value=='')
{
alert('请再次输入您的密码进行确认!');
theForm.pwd2.focus();
return false;
}
if(theForm.pwd.value!=theForm.pwd2.value)
{
alert('两次输入的密码不一样,请检查您的输入!');
theForm.pwd2.focus();
return false;
}
if(theForm.idcode.value=='')
{
alert('请先输入您的身份证号码!');
theForm.idcode.focus();
return false;
}
else
{
var s = theForm.idcode.value;
var patrn=/^[0-9A-Za-z]{15,20}$/;
if (!patrn.exec(s))
{
alert('身份证号码应该是15~20位的数字或字母,请检查您的输入!');
theForm.idcode.focus();
return false;
}
}
if(theForm.realname.value=='')
{
alert('请先输入您的真实姓名!');
theForm.realname.focus();
return false;
}
if(theForm.question.value=='')
{
alert('请先输入您的密码提示问题!');
theForm.question.focus();
return false;
}
if(theForm.answer.value=='')
{
alert('请先输入您的问题答案!');
theForm.answer.focus();
return false;
}
return true;
}
function reg_company_step1()
{
var theForm = document.regform;
if(theForm.username.value=='')
{
alert('请先输入您的用户名!');
theForm.username.focus();
return false;
}
else
{
var s = theForm.username.value;
var patrn=/^[a-zA-Z]{1}([a-zA-Z0-9]|[_]){3,15}$/;
if(!patrn.exec(s))
{
alert('用户名只能由英文字母(a-z),数字(0-9)和下划线("_")构成,不能有空格,且必须以英文字母开头。');
theForm.username.focus();
return false;
}
}
return true;
}
function reg_company_step2()
{
var theForm = document.regform;
if(theForm.pwd.value=='')
{
alert('请先输入您的密码!');
theForm.pwd.focus();
return false;
}
if(theForm.pwd.value.indexOf('\'')>=0)
{
alert('您的密码中含有非法字符,请重新输入!');
theForm.pwd.focus();
return false;
}
if(theForm.pwd2.value=='')
{
alert('请再次输入您的密码进行确认!');
theForm.pwd2.focus();
return false;
}
if(theForm.pwd.value!=theForm.pwd2.value)
{
alert('两次输入的密码不一样,请检查您的输入!');
theForm.pwd2.focus();
return false;
}
if(theForm.comname.value=='')
{
alert('请先输入您的公司名称!');
theForm.comname.focus();
return false;
}
if(theForm.question.value=='')
{
alert('请先输入您的密码提示问题!');
theForm.question.focus();
return false;
}
if(theForm.answer.value=='')
{
alert('请先输入您的问题答案!');
theForm.answer.focus();
return false;
}
return true;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -