Wulin.com (www.vevb.com) Article introduction: Newly added time type application for input.
Today, the web teaching website will lead you to appreciate the new features of HTML5. The application of tagging input to HTML5 has been newly added time type. If the format entered in the following input boxes is incorrect, it cannot be submitted.
Note: This type of input is effective in Opera10+, but it is not very good in Chrome, and the appearance depends on the browser.
1. Date type:
<form>
<input id=webjx_date name=webjx.com type=date/>
<input type=submit value=submit/
</form>
If we used js+css+dom before, we could achieve the effect of selecting dates in calendars. In HTML5, we only need to set input to date type, and we don’t need to verify the data when submitting the form, it has helped us implement it.
The operation effect is as follows:
2. Time type:
<form>
<input id=webjx_time name=webjx.com type=time/>
<input type=submit value=submit/
</form>
This type is a text box specially used to enter time, checking whether a valid time has been entered when submitting.
The operation effect is as follows:
3. DateTime type:
<form>
<input id=webjx_datetime name=webjx.com type=datetime/>
<input type=submit value=submit/
</form>
The input element of the datetime type is a text box specially used to enter UTC dates and practices. During submission, the date and time are checked effectively.
The operation effect is as follows:
4. DateTime-Local type:
<form>
<input id=webjx_datetime-local name=webjx.com type=datetime-local/>
<input type=submit value=submit/
</form>
This type is similar to the datatime type, but is used to enter the local date and time.
The operation effect is as follows:
5. Month type:
<form>
<input id=webjx_month name=webjx.com type=month/>
<input type=submit value=submit/
</form>
month is a text box that specifically enters a month. In the calendar, you can only select a certain month, not a certain day.
The operation effect is as follows:
6. Week type:
<form>
<input id=webjx_week name=webjx.com type=week/>
<input type=submit value=submit/
</form>
week is a text box specially used to enter week (week), and the number followed by W indicates how many weeks this week is in that year. You can only choose one week in the calendar, and you can't choose a certain day.
The operation effect is as follows:
HTML5 has done quite well in this regard. As for the definition of style, everyone is welcome to discuss it here!