【www.gdgbn.com--php与数据库】
邮箱email用户名检测与数据库教程
function GetEmailResult(str)
{
$("regEmailinfo").innerHTML="检测中,请稍候...";
var xmlhttp = createxmlhttprequest();
//window.open("member/regCheck.asp教程?rType=2&/="+escape(str))
xmlhttp.open("get","member/regCheck.asp?rType=2&/="+escape(str),true);
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
{
if(xmlhttp.status==200)
{
if (xmlhttp.responseText==0)
{
$("regEmailinfo").innerHTML="验证通过,请继续完成注册";
}
else if (xmlhttp.responseText==1)
{
$("regEmailinfo").className="show null";
$("regEmailinfo").innerHTML="抱歉,邮件地址[" + str + "]已被注册,一个邮件仅可以注册一个用户名";
}
else
{
$("regEmailinfo").className="show null";
$("regEmailinfo").innerHTML="邮件格式错误,请您确认输入";
}
}
}
}
xmlhttp.send(null);
}