Home > Web Front-end > H5 Tutorial > body text

Introduction to url type and email type of input element_html5 tutorial skills

WBOY
Release: 2016-05-16 15:51:07
Original
1559 people have browsed it

In the past, when we made web page input boxes, we used a lot of JS verification. Now with HTML5, writing this effect is no longer so troublesome. Let me introduce to you two new types of HTML5 input applications.
1. URL type:





After setting this type, from the appearance point of view It is almost the same as an ordinary element, but if you put this type into the form and click the submit button, if the input in this input box is not a URL address, it will not be submitted.

The operation effect is as follows:

2. Email type:

 
 

If we change the type in the above URL type code to email, then when the form is submitted, it will automatically verify whether the content in this input box is in email format. If not, it cannot submit.

If you don’t understand something, you can also leave a message directly to Script House and I will reply to you as soon as possible.
If you understand this, you can practice it yourself and post the exercises to help everyone improve together!
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!