Input Checkbox form Attribute
Definition and Usage
form
The property returns a reference to the form containing the checkbox.
This property returns the form object on success.
Note:This property is read-only.
Example
Get the id of the form containing the <input type="checkbox"> element:
var x = document.getElementById("myCheck").form.id;
Syntax
checkboxObject.form
Technical Details
Return Value: | Reference to form elements containing checkboxes. If the checkbox is not in the form, it returns null . |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |