I have two radio buttons within an HTML form. A dialog box appears when one of the fields is null. How can I check whether a radio button is selected?
With JQuery, another way to check the current status of the radio buttons is to get the attribute 'checked'.
For Example:
In this case you can check the buttons using:
if ($("#gender_male").attr("checked") == true) { ... }