谁有邮箱的验证代码?各种邮箱都行

来源:百度知道 编辑:UC知道 时间:2024/09/21 11:12:30

<script language="javascript">
<!--
function Juge(theForm)
{

if (theForm.email.value == "")
{
alert("请输入邮箱地址!");
theForm.email.focus();
return (false);
}

if (theForm.email.value.charAt(0)=="." ||
theForm.email.value.charAt(0)=="@"||
theForm.email.value.indexOf('@', 0) == -1 ||
theForm.email.value.indexOf('.', 0) == -1 ||
theForm.email.value.lastIndexOf("@")==theForm.email.value.length-1 ||
theForm.email.value.lastIndexOf(".")==theForm.email.value.length-1)
{
alert("邮箱地址错误!");
theForm.email.focus();
return (false);
}
}
</script>