function checkMail(str){
var strReg="";
var r;
var strText=document.all(str).value;
//strReg=/^/w+((-/w+)|(/./w+))*/@[A-Za-z0-9]+((/.|-)[A-Za-z0-9]+)*/.[A-Za-z0-9]+$/i;
strReg=/^/w+((-/w+)|(/./w+))*/@{1}/w+/.{1}/w{2,4}(/.{0,1}/w{2}){0,1}/ig;
r=strText.search(strReg);
if(r==-1) {
//alert("邮箱格式错误!");
document.getElementById ("Image6").style.display="none";
document.getElementById ("Label4").style.display="";
document.all(str).focus();
} else
{
document.getElementById ("Image6").style.display="";
document.getElementById ("Label4").style.display="none";
}
}
判断email
最新推荐文章于 2021-07-01 09:33:52 发布