HTML DOM Girişi Sıfırlama Nesnesi
Giriş Sıfırlama Nesnesi
Giriş Sıfırlama nesnesi, type="reset" ile bir HTML <input> öğesini temsil eder.
Bir Giriş Sıfırlama Nesnesine Erişin
getElementById() kullanarak type="reset" ile bir <input> öğesine erişebilirsiniz:
Örnek
var x = document.getElementById("myReset");
İpucu: Bir formun öğe koleksiyonunda arama yaparak da <input type="reset"> öğesine erişebilirsiniz .
Bir Giriş Sıfırlama Nesnesi Oluşturun
Document.createElement() yöntemini kullanarak type="reset" ile bir <input> öğesi oluşturabilirsiniz:
Örnek
var x = document.createElement("INPUT");
x.setAttribute("type", "reset");
Giriş Sıfırlama Nesnesi Özellikleri
Property | Description |
---|---|
autofocus | Sets or returns whether a reset button should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a reset button |
disabled | Sets or returns whether the reset button is disabled, or not |
form | Returns a reference to the form that contains the reset button |
name | Sets or returns the value of the name attribute of a reset button |
type | Returns which type of form element the reset button is |
value | Sets or returns the value of the value attribute of the reset button |
Standart Özellikler ve Etkinlikler
Giriş Sıfırlama nesnesi ayrıca standart özellikleri ve olayları da destekler .
İlgili Sayfalar
HTML öğreticisi: HTML Formları
HTML referansı: HTML <input> etiketi
HTML referansı: HTML <input> tipi özniteliği