The name property sets or returns the value of the name attribute of a radio button.
Tip: You define radio button groups with the name property (radio buttons with the same name belong to the same group).
Note: Only form elements with a name attribute will have their values passed when submitting a form.
Set the name property:
Return the name property:
The name property is supported in all major browsers.
Display the value of the name attribute of the "Red" radio button:
Your message has been sent to W3Schools.