HTML5 verification and date display

Source: Internet
Author: User

I used to ignore the powerful functions of HTML5. I don't need to verify most of its data, and I don't need to add plug-ins to display calendars. I would like to share some small functions with you.

1. the Email input box automatically verifies the Email validity.

<! Doctype html>
<Html>
<Body>
<Form action = "#" method = "get">
E-mail: <input type = "email" name = "user_email"/> <br/>
<Input type = "submit"/>
</Form>
</Body>
</Html>

2. Enter the number. The verification is correct. You can set the start digit.

<! Doctype html>

 

3. the URL input box can verify the validity of the URL input.

<Form action = "#" method = "get"> URL: <input type = "url" name = "user_email"/> <br/> <input type = "submit"/> </form>

 

4. Date pickers (date, month, week, time, datetime, datetime-local) Selection box, you can select Date, time, month, week.

<! Doctype html>
<Html>
<Body>
<Form action = "#" method = "get">
Date: <input type = "date" name = "user_email"/>
Month: <input type = "month" name = "user_email"/>
Week: <input type = "week" name = "user_email"/>
Time: <input type = "time" name = "user_email"/>
Datetime: <input type = "datetime" name = "user_email"/>
Datetime-local: <input type = "datetime-local" name = "user_email"/>
<Input type = "submit"/>
</Form>
</Body>
</Html>

5. Select datalist input.

<! Doctype html>

<Form action = "#" method = "get">

Webpage: <input type = "url" list = "url_list" value = "fdf" name = "user_email"/>

<Datalist id = "url_list">

<Option label = "W3School" value = "http://www.w3school.com.cn"/>

<Option label = "Microsoft" value = "http://www.microsoft.com"/>

</Datalist> <input type = "submit"/>

</Form> </body>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.