Input Range 對象是 HTML5 中的新對象。
Input Range 對象表示 HTML <input type="range"> 元素。
注釋:Internet Explorer 9 以及更早的版本不支持 <input type="range"> 元素。
您可以通過使用 getElementById() 來訪問 <input type="range"> 元素:
var x = document.getElementById("myRange");
提示:您也可以通過遍歷表單的 elements 集合來訪問 Input Range 對象。
您可以通過使用 document.createElement() 方法來創(chuàng)建 <input type="range"> 元素:
var x = document.createElement("INPUT"); x.setAttribute("type", "range");
屬性 | 描述 |
---|---|
autocomplete | 設(shè)置或返回滑塊控件的 autocomplete 屬性值。 |
autofocus | 設(shè)置或返回滑塊控件在頁面加載后是否應(yīng)自動獲取焦點。 |
defaultValue | 設(shè)置或返回滑塊控件的默認(rèn)值。 |
disabled | 設(shè)置或返回滑塊控件是否被禁用。 |
form | 返回對包含滑塊控件的表單的引用。 |
list | 返回對包含滑塊控件的 datalist 的引用。 |
max | 設(shè)置或返回滑塊控件的 max 屬性值。 |
min | 設(shè)置或返回滑塊控件的 min 屬性值。 |
name | 設(shè)置或返回滑塊控件的 name 屬性值。 |
step | 設(shè)置或返回滑塊控件的 step 屬性值。 |
type | 返回滑塊控件的表單元素類型。 |
value | 設(shè)置或返回滑塊控件的 value 屬性值。 |
如對本文有疑問,請?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會為你解答??! 點擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號