function
CheckEmail()
... {
var obj=document.getElementById("checkEmail");
var email=document.getElementById("TxtEmail").value;
obj.className="Right";
obj.innerHTML='正在检查,请稍候...';
if(email.length>0)
...{
var Expression=/^w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*$/
var regExp=new RegExp(Expression);
if(regExp.test(email)==false)
{
checkEmail="false1";
SetCheckEmail(checkEmail);
return;
}
else if(checking==true)
{
checkEmail="false2";
SetCheckEmail(checkEmail);
return;
}
else
{
checking=true;
dos("e"+email);
}
}
else
{
checkEmail="false"
SetCheckEmail(checkEmail);
return;
}
}
function SetCheckEmail(arguments)
{
var obj=document.getElementById("checkEmail");
if(arguments=="false")
{
obj.className="Error";
obj.innerHTML='请输入Email地址';
}
else if(arguments=="false1")
{
obj.className="Error";
obj.innerHTML='Email地址无效,请重新输入';
}
else if(arguments=="false2")
{
obj.className="Error";
obj.innerHTML='服务器忙,请稍候...';
}
else if(arguments=="false3")
{
obj.className="Error";
obj.innerHTML='Email地址已被注册';
}
else if(arguments=="true")
{
obj.className="Right";
obj.innerHTML='Email地址可以使用';
}
}
... {
var obj=document.getElementById("checkEmail");
var email=document.getElementById("TxtEmail").value;
obj.className="Right";
obj.innerHTML='正在检查,请稍候...';
if(email.length>0)
...{
var Expression=/^w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*$/
var regExp=new RegExp(Expression);
if(regExp.test(email)==false)
{
checkEmail="false1";
SetCheckEmail(checkEmail);
return;
}
else if(checking==true)
{
checkEmail="false2";
SetCheckEmail(checkEmail);
return;
}
else
{
checking=true;
dos("e"+email);
}
}
else
{
checkEmail="false"
SetCheckEmail(checkEmail);
return;
}
}
function SetCheckEmail(arguments)
{
var obj=document.getElementById("checkEmail");
if(arguments=="false")
{
obj.className="Error";
obj.innerHTML='请输入Email地址';
}
else if(arguments=="false1")
{
obj.className="Error";
obj.innerHTML='Email地址无效,请重新输入';
}
else if(arguments=="false2")
{
obj.className="Error";
obj.innerHTML='服务器忙,请稍候...';
}
else if(arguments=="false3")
{
obj.className="Error";
obj.innerHTML='Email地址已被注册';
}
else if(arguments=="true")
{
obj.className="Right";
obj.innerHTML='Email地址可以使用';
}
}