Article introduction of Wulin.com (www.vevb.com): In the past, when we made web page input boxes, we used a lot of JS verification. Now that we have the effect of HTML5 writing, it is no longer so troublesome. Let me introduce to you two new types of applications of HTML5 input.
In the past, we used a lot of JS verification to create web page input boxes. Now, with HTML5 writing, it is no longer so troublesome. 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.
The operation effect is as follows:
2. Email type:
<form>
<input name=email 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.
If you don’t understand, you can leave a message to the web teaching website directly, and I will reply to everyone as soon as possible.
If you understand this, you can practice it yourself and post it to help everyone make progress together!