JavaScript Reference :: Label

The easiest way to create an Label object is to get the HTML element using either the document method getElementById or getElementsByTagName to get a reference to an HTML label tag. Of course, you may also use document.createElement("label"). Once you have the element, you can assign event handlers or modify the properties.

methods

properties

htmlFor
The value provided in the for attribute of the HTML tag.

events

onblur
onclick
ondblclick
onfocus
onkeydown
onkeypress
onkeyup
onmousedown
onmouseout
onmouseover
onmouseup
onresize