Article introduction of Wulin.com (www.vevb.com): HTML5 Daily Practice Newly added URL types and email types applications.
In the past, we used a lot of JS verification to create this type of input box. Now, it is no longer so troublesome to write this effect with HTML5. Let me introduce to you two new types of applications of HTML5 input.
1. URL type:
<form>
<input name=urls type=url value=/>
<input type=submit value=submit/
</form>
After setting this type, it looks similar to ordinary elements from the appearance, but if you put this type in the form and click the Submit button, if you enter a URL address in this input box, you will not be able to submit it.
2. Email type:
<form>
<input name=urls type=email value=/>
<input type=submit value=submit/
</form>
If we change the type in the URL-type code above 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 be submitted.