HTML 标签max属性
实例
min 和 max 属性的使用:
Enter a date before 1980-01-01:
Enter a date after 2000-01-01:
Quantity (between 1 and 5):
亲自测试一下
浏览器支持
Internet Explorer 10、Opera、Chrome 和 Safari 支持 max 属性。
注意:Firefox 或者 Internet Explorer 9 及之前的版本不支持 标签的 max 属性。
注意:由于 Internet Explorer 10 不支持这些 input 类型,max 属性将不适用于 IE 10 中的 date 和 time。
定义和用法
max 属性规定 元素的最大值。
提示:max 属性与 min 属性配合使用,可创建合法值范围。
注意:max 和 min 属性适用于以下 input 类型:number、range、date、datetime、datetime-local、month、time 和 week。
HTML 4.01 与 HTML5之间的差异
max 属性是 HTML5 中的新属性。
语法
属性值 值 描述
number 数字值。规定输入字段允许的最大值。
date 日期。规定输入字段允许的最大值。
属性
描述
input accept
input align
input alt
input autocomplete
input autofocus
input checked
input disabled
input form
input formaction
input formenctype
input formmethod
input formnovalidate
input formtarget
input height
input list
input maxlength
input min
input multiple
name
pattern
placeholder
input readonly
input required
size
input src
step
type
value
input width
本文网址:http://www.santii.com/html/attr-input-max.html