alert((input[name rdname]:checked).val()) Getting Radio Value using Name Attribute and jQuery.This method uses jQuery to loop through all the radio buttons on a page, check if the radio button is "checked", and then alerts all their "names" and "values". I have radio button list which has id as the value, I want to access the selected id in the jquery function. - -Solutions- If you have HTML that looks like this:
val() In above code, rbnNumber is name of the radio group. Demo. HTML Code: JQuery Code: Result: See Complete Code. In this tutorial we will get the value of select Radio Button using jQuery api. jQuery provide the :checked selector for getting the value of checked radio button. :checked selector added since version 1.0. Allow to select one button at a time.