HTML DOM Etiket Nesnesi
Etiket Nesnesi
Label nesnesi, bir HTML <label> öğesini temsil eder.
Bir Etiket Nesnesine Erişme
Bir <label> öğesine getElementById() kullanarak erişebilirsiniz:
Örnek
var x = document.getElementById("myLabel");
Bir Etiket Nesnesi Oluşturun
Document.createElement() yöntemini kullanarak bir <label> öğesi oluşturabilirsiniz:
Örnek
var x = document.createElement("LABEL");
Etiket Nesnesi Özellikleri
Property | Description |
---|---|
control | Returns the labeled control |
form | Returns a reference to the form that contains the label |
htmlFor | Sets or returns the value of the for attribute of a label |
Standart Özellikler ve Olaylar
Label nesnesi ayrıca standart özellikleri ve olayları da destekler .
İlgili Sayfalar
HTML öğreticisi: HTML Formları
HTML referansı: HTML <label> etiketi