Home > Web Front-end > JS Tutorial > JavaScript function to verify email address_javascript skills

JavaScript function to verify email address_javascript skills

WBOY
Release: 2016-05-16 16:38:52
Original
1662 people have browsed it

This article introduces a JavaScript function to verify email addresses, which is quite reliable.

JavaScript function to verify email address, the source code is as follows:

function checkEmail(text) {
 if( text.match(/qq\.com$/) ) {
  return -1;
 }
 if( ! text.match(/^\w+([._-]\w+)*@(\w+\.)+\w+$/) ) {
  return false;
 }
 return true;
}

Copy after login

About the JavaScript email verification function, this article will introduce you so much. I hope it will be helpful to you, thank you!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template