HTML 參考手冊(cè)
min 和 max 屬性的使用:
Internet Explorer 10、Opera、Chrome 和 Safari 支持 max 屬性。
注意:Firefox 或者 Internet Explorer 9 及之前的版本不支持 <input> 標(biāo)簽的 max 屬性。
注意:由于 Internet Explorer 10 不支持這些 input 類型,max 屬性將不適用于 IE 10 中的 date 和 time。
max 屬性規(guī)定 <input> 元素的最大值。
提示:max 屬性與 min 屬性配合使用,可創(chuàng)建合法值范圍。
注意:max 和 min 屬性適用于以下 input 類型:number、range、date、datetime、datetime-local、month、time 和 week。
max 屬性是 HTML5 中的新屬性。
值 | 描述 |
---|---|
number | 數(shù)字值。規(guī)定輸入字段允許的最大值。 |
date | 日期。規(guī)定輸入字段允許的最大值。 |