Input Checkbox type Attribute
Definition and Usage
type
The property returns what type of form element the checkbox is.
For checkboxes, this property will always return "checkbox
".
Example
Find out which type of form element the checkbox is:
var x = document.getElementById("myCheck").type;
Syntax
checkboxObject.type
Technical Details
Return Value: | String. The form element type of the checkbox. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |