jQuery get which radio is selected

Use the :checked selector along with the radio selector.
With form id, can do this

$('input[name=radioName]:checked', '#myForm').val();


$("#myform input[type='radio']:checked").val();

Without form is, it will still work:


By Keenlio, August 22, 2014

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

6 + three =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>