1 / 7
文档名称:

前端工程师-设计开发HTML5新的Input类型解释.docx

格式:docx   大小:90KB   页数:7页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

前端工程师-设计开发HTML5新的Input类型解释.docx

上传人:非学无以广才 2021/12/3 文件大小:90 KB

下载得到文件列表

前端工程师-设计开发HTML5新的Input类型解释.docx

相关文档

文档介绍

文档介绍:HTML5 拥有多个新表单输入类型。这些新特征提供了愈加好输入控制和验证。本文将介绍HTML5 新 Input 类型。
AD:
HTML5 拥有多个新表单输入类型。这些新特征提供了愈加好输入控制和验证。
介绍这些新输入类型:
email
url
number
range
Date pickers (date, month, week, time, datetime, datetime-local)
search
color
telephone
color
EMAIL
<input type="email" /> 
在提交表单时会自动验证email格式
效果:
URL
<input type="url" /> 
在提交表单时会自动验证url格式
效果:
NUMBER
<input type="number" max="9" min="0" step="2"/> 
能够限制输入数字,step为上一个数字和下一个数字间隔
效果:
RANGE
<input type="range"  min="1" max="10" /> 
滑动条,能过选择性对限制范围内数值进行设置
效果:
Date Pickers(数据检出器)
HTML5 拥有多个可供选择日期和时间新输入类型:
date - 选择日、月、年
month - 选择月、年
week - 选择周和年
time - 选择时间(小时和分钟)
datetime - 选择时间、日、月、年(UTC 时间)
datetime-local - 选择时间、日、月、年(当地时间)
This is how Opera renders <input type="date">:
 
If you need a time to go with that date, Opera also supports <input type="datetime">:
 
If you only need a month + year (perhaps a credit card expiration date), Opera can render a <input type="month">:
 
Less common, but also available, is the ability to pick a specific week of a year with <input type="week">:
 
Last but not least, you can pick a time with <input type="time">:
地址:
以上全部是从相关时