HTML DOM Label form properties
Examples
Returns <label> element in the form id:
var x = document.getElementById("myLabel").form.id;
x The output is:
myForm
try it"
Definition and Usage
form property returns a reference to the form of the label.
If successful, the property returns a form object.
Note: This property is read-only.
Browser Support
All major browsers support form property.
grammar
labelObject .form
technical details
return value: | A reference to the form that contains the label. If the label is not in the form, then return null. |
---|