HTML DOM Girişi Radyo Nesnesi
Giriş Radyo Nesnesi
Input Radio nesnesi, type="radio" ile bir HTML <input> öğesini temsil eder.
Bir Giriş Radyo Nesnesine Erişme
getElementById() kullanarak type="radio" ile bir <input> öğesine erişebilirsiniz:
Örnek
var x = document.getElementById("myRadio");
İpucu: Bir formun öğe koleksiyonunda arama yaparak da <input type="radio"> öğesine erişebilirsiniz .
Giriş Radyo Nesnesi Oluşturun
Document.createElement() yöntemini kullanarak type="radio" ile bir <input> öğesi oluşturabilirsiniz:
Örnek
var x = document.createElement("INPUT");
x.setAttribute("type", "radio");
Giriş Radyo Nesnesi Özellikleri
Property | Description |
---|---|
autofocus | Sets or returns whether a radio button should automatically get focus when the page loads |
checked | Sets or returns the checked state of a radio button |
defaultChecked | Returns the default value of the checked attribute |
defaultValue | Sets or returns the default value of a radio button |
disabled | Sets or returns whether the radio button is disabled, or not |
form | Returns a reference to the form that contains the radio button |
name | Sets or returns the value of the name attribute of a radio button |
required | Sets or returns whether the radio button must be checked before submitting a form |
type | Returns which type of form element the radio button is |
value | Sets or returns the value of the value attribute of the radio button |
Standart Özellikler ve Olaylar
Input Radio 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