文件名称:js验证邮箱、qq号、手机电话.
文件大小:4KB
文件格式:TXT
更新时间:2013-12-05 11:02:21
js 验证
//验证邮箱 function verfifyEmail(){ var strEmail = document.getElementById("email").value; var email_info = document.getElementById("email_info"); if(verifyIsNull(email_info,strEmail)){ email_Flag = false; return ; } var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; email_Flag = reg.test(strEmail); if(email_Flag){ email_info.innerHTML = "恭喜!邮箱地址输入正确。"; }else{ email_info.innerHTML = "对不起,您输入的邮箱地址格式错误。"; } }