1、新建一个html文件,命名为test.html,用于讲解html5中input标签新的属性如何使用。
2、当input的type类型为number时,input只允许输入数字,非数字不能输入。
3、当input的type类型为color时,当点击input时,会弹出弹窗让你选择颜色,选中确认后input就是你所选的颜色。
4、当input的type类型为range时,input就变成了滑动条,可以给它添加min最小值,max最大值。
5、当input的type类型为date时,点击input时会弹出日期的选择窗,选中日期后,input就是所选的日期。
6、在浏览器打开test.html文件,查看效果。