This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
用途:检查输入的Email信箱格式是否正确 | |
输入:strEmail:字符串 | |
返回:如果通过验证返回true,否则返回false | |
*/ | |
function checkEmail(strEmail) | |
{ | |
//var emailReg = /^[_a-z0-9]+@([_a-z0-9]+\.)+[a-z0-9]{2,3}$/; | |
var emailReg = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/; | |
if ( emailReg.test(strEmail) ) { |