HTML DOM Etiket Voorwerp
Etiket Voorwerp
Die Label-objek verteenwoordig 'n HTML <label>-element.
Toegang tot 'n etiketvoorwerp
Jy kan toegang tot 'n <label>-element kry deur getElementById():
Voorbeeld
var x = document.getElementById("myLabel");
Skep 'n etiketvoorwerp
Jy kan 'n <label> element skep deur die document.createElement() metode te gebruik:
Voorbeeld
var x = document.createElement("LABEL");
Benoem voorwerpeienskappe
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 |
Standaard eiendomme en geleenthede
Die Label-objek ondersteun ook die standaard eienskappe en gebeurtenisse .
Verwante bladsye
HTML-tutoriaal: HTML-vorms
HTML verwysing: HTML <label> tag