html5新增表单元素
<form action="">
<!--
min:最小值
max:最大值
step:步长
value:默认值
-->
数字框:
数字框:
<input type="number" min="1" max="0" step="2" value="1"><br>
邮箱
<!-- 邮箱
规定格式,使用submit提交时会报错拦截
-->
邮箱:
<input type="email"><br>
手机号:
<!--
手机号:
规定格式,使用submit提交时会报错拦截
-->
手机号:
<input type="tel"><br>
地址:
<!--
地址:
规定格式,使用submit提交时会报错拦截
-->
地址:
<input type="url"><br>
日期
<!--
日期
-->
日期:
<input type="date"><br>
时间
<!--
时间
-->
时间:
<input type="time"><br>
日期时间
<!--
日期时间
datetime-------大部分浏览器不支持
datetime-local-------支持
-->
日期时间:
<input type="datetime"><br>
日期时间(本地):
<input type="datetime-local"><br>
月份
<!--
月份
-->
月份:
<input type="month"><br>
星期
<!--
星期
-->
星期:
<input type="week"><br>
搜索
<!--
搜索
输入内容后面会出现全部删除的x
-->
搜索框:
<input type="search"><br>
颜色块
<!--
颜色块
取色用
-->
颜色块:
<input type="color">
</form>