写日志 刷新 共 1 篇

验证邮箱是否正确

2010-05-18 06:58:24 海蓝港湾

一段时间以来,经常有病友因为邮箱格式错误,无法收到密码。今天改进了邮箱格式验证程序。如下:

function VerifyInput()
{
var mail = document.form.usermail.value;
if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail))==false)
{
alert("您输入的Email有错误\n请重新检查您的Email");
document.form.usermail.focus();
return false;
}
return true;
}

阅读全文 编辑 删除

Powered by BBSxp /Licence © 1998-2005
Script Execution Time:0ms
晋ICP备07500169号-1