HTML DOM Giriş Aralığı Nesnesi
Giriş Aralığı Nesnesi
Giriş Aralığı nesnesi, type="range" ile bir HTML <input> öğesini temsil eder.
Bir Giriş Aralığı Nesnesine Erişme
getElementById() kullanarak type="range" ile bir <input> öğesine erişebilirsiniz:
Örnek
var x = document.getElementById("myRange");
İpucu: Bir formun öğe koleksiyonunda arama yaparak da <input type="range"> öğesine erişebilirsiniz .
Bir Giriş Aralığı Nesnesi Oluşturun
Document.createElement() yöntemini kullanarak type="range" ile bir <input> öğesi oluşturabilirsiniz:
Örnek
var x = document.createElement("INPUT");
x.setAttribute("type", "range");
Giriş Aralığı Nesne Özellikleri
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a slider control |
autofocus | Sets or returns whether a slider control should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a slider control |
disabled | Sets or returns whether a slider control is disabled, or not |
form | Returns a reference to the form that contains the slider control |
list | Returns a reference to the datalist that contains the slider control |
max | Sets or returns the value of the max attribute of the slider control |
min | Sets or returns the value of the min attribute of the slider control |
name | Sets or returns the value of the name attribute of a slider control |
step | Sets or returns the value of the step attribute of the slider control |
type | Returns which type of form element the slider control is |
value | Sets or returns the value of the value attribute of a slider control |
Giriş Aralığı Nesne Yöntemleri
Method | Description |
---|---|
stepDown() | Decrements the value of the slider control by a specified number |
stepUp() | Increments the value of the slider control by a specified number |
Standart Özellikler ve Olaylar
Giriş Aralığı nesnesi, standart özellikleri ve olayları da destekler .
İlgili Sayfalar
HTML öğreticisi: HTML Formları
HTML referansı: HTML <input> etiketi
HTML referansı: HTML <input> tipi özniteliği