Checkbox name attribute
Checkbox Object
Definition and Usage
The name attribute sets or returns the value of the checkbox element's name attribute.
The name attribute is used to send data to the server after form submission, or to reference form data in JavaScript.
Note: After form submission, only the name attribute of form elements is used to pass data values.
Syntax
Set the name attribute:
checkboxObject.name="
name
"
Return the name attribute:
checkboxObject.name
Browser support





All major browsers support the name property.
Example
Example
The example below outputs the name of the checkbox:
Try it »
Checkbox Object