HTML5基础学习
HTML5 TYPE新增的属性有:color、date、datetime、datetime-local 、month、week、time 、email、number、range、search、tel、url,
=======
<input type="date" name="date">
<input type="month" name="month">
<input type="week" name="week">
<input type="datetime" name="datetime">
<input type="datetime-local" name="datetime-local">
A:time用来设置时间(小时和分钟);
B:date用来设置年月日;
C:month用来设置年和月;
D:week用来设置年和周;
D:datetime用来设置年月日和时间;(utc时间) 不常用,以后可能会被清除,苹果中已经删除,所以兼容性不好。
Google chrome谷歌浏览器中显示:
在Firefox火狐浏览器中显示:
=================================
A:type=”number”number 类型用于应该包含数值的输入域;
B:type=”range”类型用于应该包含一定范围内数字值的输入域;
C:type=”color”定义拾色器;
D:search类型用于搜索域,可以在输入框中输入内容,当输入内容后,输入框的最后面会有一个“×”号,当点击“×”号时,输入框的搜索内容会被清除;只有goole chrome才会有×符号。
-—————————
autocomplete=”on” 如果不填写该属性则默认是自动完成的,双击会有之前填写的记录。
autocomplete=”off” 双击文本框不会出现之前填写的记录。
autocomplete属性规定form或input域拥有自动完成功能,该属性适用于
还没有评论,来说两句吧...