Javascript ~ check Email Validation function

function isEmail(string) {
if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
return true;
else
return false;
}

http://www.codetoad.com/javascript/is_valid_email.asp

沒有留言: