日期:2009-04-01  浏览次数:20836 次

<script language="javascript">
<!--

function bbs(theForm)
{
if (theForm.user.value == "")
{
alert("请输入用户名!");
theForm.user.focus();
return (false);
}
if (checktext(theForm.user.value))
{
alert("请您输入有效用户名!");
theForm.user.select();
theForm.user.focus();
return (false);
}


if (theForm.passwd.value == "")
{
alert("请输入密码!");
theForm.passwd.focus();
return (false);
}
if (checktext(theForm.passwd.value))
{
alert("请您输入有效密码!");
theForm.passwd.select();
theForm.passwd.focus();
return (false);
}




var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var checkStr = theForm.user.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}


if (!allValid)
{
alert("您输入的用户名不能含有字符 < / > ' ! =等!");
theForm.user.focus();
return (false);
}
if (checktext(theForm.user.value))
{
alert("您输入的用户名不能含有字符 < / > ' ! =等!");
theForm.user.select();
theForm.user.focus();
return (false);
}


var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var checkStr = theForm.passwd.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}


if (!allValid)
{
alert("您输入的密码不能含有字符 < / > ' ! =等!");
theForm.passwd.focus();
return (false);
}
if (checktext(theForm.passwd.value))
{
alert("您输入的密码不能含有字符 < / > ' ! =等!");
theForm.passwd.select();
theForm.passwd.focus();
return (false);
}

}

function bbs1(theForm)
{if (theForm.keyword.value == "")
{
alert("请输入关键字!");
theForm.keyword.focus();
return (false);
}
if (checktext(theForm.keyword.value))
{
alert("请输入关键字!");
theForm.keyword.select();
theForm.keyword.focus();
return (false);
}
}

function bbs3(theForm)
{

if (theForm.passwd.value == "" || theForm.passwd1.value == "")
{
alert("请输入密码!");
theForm.passwd.focus();
return (false);
}

if (theForm.passwd.value.length <4 || theForm.passwd.value.length>7)
{
alert("请输入密码必须在4-6位!");
theForm.passwd.focus();
return (false);
}
if(theForm.passwd.value != theForm.passwd1.value)
{
alert("两次密码输入不一致")
theForm.passwd.select();
theForm.passwd.focus();
return (false);
}
if(theForm.psda.value == "")
{alert("输入密码提示问题!")
theForm.psda.select();
theForm.psda.focus();
return (false);
}

if(theForm.psdq.value == "")
{alert("输入密码提示答案!")
theForm.psdq.select();
theForm.psdq.focus();
return (false);
}
if (theForm.email.value == "")
{
alert("请您输入您的\"E-Mail\"联系方式!"