How to get the value of the selected radio button in jQuery
How to get the value of the selected radio button with jQuery – Edit content (add a revision)
If you want to get the value of the selected radio button from a structure like this : [code,html] ------ <input type="radio" name="radio_btn" value="value1" /> Option 1 <br /> <input type="radio" name="radio_btn" value="value2" /> Option 2 ------ You can use the following jQuery code : [code,javascript] ------ // Get the value var selected = $('[name=radio_btn]:checked').val(); // Display it alert(selected); ------ That was all :) Pretty simple, eh?
Save as new Revision
Syntax docs