min属性设置input标签的最小值,如果与max属性一起使用,代表某个范围值。
<input type="time" name="time" min="20:00"/>
![]() | max 和 min 属性适用于以下 input 类型:number、range、date、datetime、datetime-local、month、time 和 week。 |
Internet Explorer 9 及之前的版本不支持 <input> 标签的 min属性。
<input min="数学/日期/时间">
值 | 描述 |
---|---|
数值 | 数字值。规定输入字段允许的最小值。(如:1 数字1) |
日期 | 日期。规定输入字段允许的最小值。(如:1986-01-01 1986年1月1日) |
时间 | 时间。规定输入字段允许的最小值。(如:20:01晚上八点零一分) |
![]() | max属性值的填写方式是和input的type属性有关。不同的type值,则需要填写不同的max属性值。 |