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