function yan()
{
var zifuji = new Array ("1","2","3","4","5","6","7" ,"8" ,"9","a" ,"b" ,"c" ,"d" ,"e" ,"f" ,"g" ,"h" ,"j" ,"k" ,"l" ,"m" ,"n" ,"p" ,"q" ,"r" ,"s" ,"t" ,"u" ,"v" ,"w" ,"x" ,"y" ,"z")
var ma=""
for (var i=1;i<=4;i++)
{
ma=ma+zifuji[Math.floor(Math.random()*zifuji.length)];
}
document.getElementById("xianshi").value=ma;
}
function bianhong(x)
{
document.getElementById(x).style.borderColor="FF0000"
return;
}
function bianhuan(x)
{
document.getElementById(x).style.borderColor=""
return;
}
function yanzheng()
{
var username=document.getElementById("username").value;
if(username=="")
{
document.getElementById("cuowu").innerHTML=("用户名不能为空,请输入!");
document.getElementById("username").focus();
return false;
}
if(username.length<3||username.length>12)
{
document.getElementById("cuowu").innerHTML=("用户名输入错误,请重新输入!");
document.getElementById("username").select();
return false;
}
var pwd=document.getElementById("pwd").value;
if(pwd=="")
{
document.getElementById("cuowu").innerHTML=("密码不能为空,请输入!");
document.getElementById("pwd").focus();
return false;
}
if(pwd.length<6||pwd.length>15)
{
document.getElementById("cuowu").innerHTML=("密码输入错误,请重新输入!");
document.getElementById("pwd").select();
return false;
}
var tianma2=document.getElementById("tianma2").value;
if(tianma2=="")
{
document.getElementById("cuowu").innerHTML=("验证码不能为空,请输入!");
document.getElementById("tianma2").focus();
return false;
}
var Xianshi=document.getElementById("xianshi").value;
if (tianma2.toUpperCase()!=Xianshi.toUpperCase())
{
document.getElementById("cuowu").innerHTML=("验证码输入错误,请重新输入!");
document.getElementById("tianma2").select();
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
无标题文档
yan()
return false;
}
}