Radio buttons are defined using the tag with type="radio" . To group them (so only one can be selected at a time), they must share the same name attribute.

Option 1 Option 2 Submit Use code with caution. Copied to clipboard 2. Accessing the Selected Radio Button

You can use the DOM Selector API to find which radio button is currently checked.