HTML:标记语言
CSS:样式语言
JavaScript:脚本语言
Web API:编程接口
所有 Web 技术
学习 Web 开发
发现我们的工具
更好地了解 MDN
此特性已相当成熟,可在许多设备和浏览器版本上使用。自 2015 年 7 月以来,各浏览器均已提供此特性。
HTMLInputElement 接口的 min 属性反映了 <input> 元素的 min 属性,该属性通常定义了数字或日期时间输入的最小值。如果未显式设置该属性,则 min 属性为空字符串。
HTMLInputElement
min
<input>
一个字符串,表示元素的 min 值,如果未显式设置 min,则为空字符串。
const inputElement = document.querySelector("#range"); console.log(inputElement.min); // the current value of the min attribute inputElement.min = 0; // sets the min value to "0"
加载中…
HTMLInputElement.max
HTMLInputElement.value
HTMLInputElement.type