Home  >  Article  >  Web Front-end  >  E-mail address format verification in JavaScript

E-mail address format verification in JavaScript

亚连
亚连Original
2018-05-28 15:38:345609browse

This article will share with you the E-mail address format verification in JavaScript. The project requires that the input data must contain the @ symbol and the period. The code is simple and easy to understand, very good, and has reference value. Friends who need it can refer to it

I recently worked on a front-end project, and the requirements are: the input data must contain the @ symbol and the period (.). At the same time, @ cannot be the first character of the email address, and there must be at least one period after @.

1: Code





利用JavaScript验证是否符合电子邮箱地址

Email:

##2: Result

E-mail address format verification in JavaScript

The picture below shows that the email format you entered is accurate. Whether it exists or not is another matter!

E-mail address format verification in JavaScript

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

ajax implementation of clicking different links to display the returned content in a specific div

Jquery $ .Execution sequence of a piece of code outside the ajax function

Create ajax image upload by yourself

The above is the detailed content of E-mail address format verification in JavaScript. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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 [email protected]