How do I select a single checkbox in HTML?
The <input type="checkbox"> defines a checkbox. The checkbox is shown as a square box that is ticked (checked) when activated. Checkboxes are used to let a user select one or more options of a limited number of choices.
How do I allow only one checkbox to be checked?
change(function() $("#myform input:checkbox"). attr("checked", false); $(this). attr("checked", true); ); This should work for any number of checkboxes in the form.