<script Language=\JavaScript\>
function FormCheck(theform)
{
if (theformhybzvalue ==\\)
{
alert(\请选择注册类别!\);
theformhybzfocus();
return (false);
}
if (theformuservalue ==\\)
{
alert(\请填写您的用户名!\);
theformuserfocus();
return false;
}
var filter=/^\\s*[AZaz_]{}\\s*$/;
if (!filtertest(theformuservalue)) {
alert(\用户名填写不正确请重新填写!可使用的字符为(AZ az _ )长度不小于个字符不超过个字符注意不要使用空格\);
theformuserfocus();
theformuserselect();
return false;
}
if (theformpassvalue ==\\)
{
alert(\请填写您的密码!\);
theformpassfocus();
return false;
}
if(nfirmPasswordvalue==\\){
alert(\请输入您的确认密码!\);
nfirmPasswordfocus();
return false;
}
var filter=/^\\s*[AZaz_]{}\\s*$/;
if (!filtertest(theformpassvalue)) {
alert(\密码填写不正确请重新填写!可使用的字符为(AZ az _ )长度不小于个字符不超过个字符注意不要使用空格\);
theformpassfocus();
theformpassselect();
return false;
}
if (theformpassvalue!=nfirmPasswordvalue ){
alert(\两次填写的密码不一致请重新填写!\);
theformpassfocus();
theformpassselect();
return false;
}
if (theformquestionvalue ==\\)
{
alert(\请输入密码提示问题!\);
theformquestionfocus();
return (false);
}
if (theformanswervalue ==\\)
{
alert(\请输入密码提示答案!\);
theformanswerfocus();
return (false);
}
if (theformnamevalue ==\\)
{
alert(\请输入您的姓名!\);
theformnamefocus();
return (false);
}
if (theformsfvalue ==\\)
{
alert(\请选择区域!\);
theformsffocus();
return (false);
}
if (theformcityvalue ==\\)
{
alert(\请选择城镇名!\);
theformcityfocus();
return (false);
}
if (theformqymcvalue ==\\)
{
alert(\请输入您的公司名称!\);
theformqymcfocus();
return (false);
}
if (theformqylbvalue ==\\)
{
alert(\请选择您的单位性质!\);
theformqylbfocus();
return (false);
}
if (theformaddressvalue ==\\)
{
alert(\请输入您的联系地址!\);
theformaddressfocus();
return (false);
}
if (theformpostvalue ==\\)
{
alert(\请输入邮政编码!\);
theformpostfocus();
return (false);
}
if (theformphonevalue ==\\)
{
alert(\请输入您的联系电话!\);
theformphonefocus();
return (false);
}
if (theformemailvalue ==\\)
{
alert(\请输入您的电子邮件地址!\);
theformemailfocus();
theformemailselect();
return false;
}
var filter=/@/;
if (!filtertest(theformemailvalue)) {
alert(\邮件地址不正确请重新填写!\);
theformemailfocus();
theformemailselect();
return false;
}
<! theformsubmit() >
}
</script>
调用代码
表单提交时用下列代码调用
onSubmit=\return FormCheck(this);\