Hi here is the codes bellow, I\'ve tried many things but I couldnt get value of selected radio button.As you can see I need to get that value for diffrent situations.
<
I choose let number of code for a required function. The one worked for me is given below from api.jquery.com. Hope this helps others.
HTML
option1
option2
JavaScript
var selectedOption = $("input:radio[name=option]:checked").val()
The variable selectedOption will contain the value of the selected radio button (i.e) o1 or o2