Home > Web Front-end > Front-end Q&A > What is the value of html5 time control

What is the value of html5 time control

青灯夜游
Release: 2022-01-17 14:55:04
Original
2668 people have browsed it

html5 There are six values ​​for the time control: 1. "date", which defines the date control; 2. "time", which defines the time control; 3. "datetime-local", which defines the date and time control; 4. "month", defines the month control; 5. "week", defines the week control; 6. "datetime".

What is the value of html5 time control

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

HTML5 defines several new controls related to dates. Browsers that support date controls will provide a convenient drop-down calendar for users to select.
Note: Currently, only Chrome and Opera provide drop-down calendar support, other browsers are still a normal text box.

1. Date control - date

What is the value of html5 time control

<input type="date" value="2021-01-17"/>
Copy after login

2. Time control - time

What is the value of html5 time control

2-What is the value of html5 time control

<input type="time" value="13:59"/>
<input type="time" value="13:59:59"/>
Copy after login

3. Date and time control-datetime-local

What is the value of html5 time control

<input type="datetime-local" value="2021-01-17T13:59:59"/>
Copy after login

4. Month control - month

What is the value of html5 time control

<input type="month" value="2021-01"/>
Copy after login

5. Week control - week

What is the value of html5 time control

<input type="week" value="2022-W02"/>
Copy after login

6. Date and time control--datetime

What is the value of html5 time control

<input type="datetime" value="2022-01-17T13:59:59"/>
Copy after login

Note: The date and time control also supports min and The max attribute represents the minimum and maximum time that can be set

What is the value of html5 time control

<input type="date" value="2022-01-17" min="2022-01-16" max="2015-01-26"/>
Copy after login

Related recommendations: "html video tutorial"

The above is the detailed content of What is the value of html5 time control. For more information, please follow other related articles on the PHP Chinese website!

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
Latest Issues
html5 validation for symfony 2.1
From 1970-01-01 08:00:00
0
0
0
The difference between HTML and HTML5
From 1970-01-01 08:00:00
0
0
0
html5 show hide
From 1970-01-01 08:00:00
0
0
0
Can PDF files run HTML5 and Javascript?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template