I have a Radio Buttons for Gender and Drop down for Courses,
I have Dynamic values in Jquery.
How can I get the selected options in both Gender and Courses.
Here is my Fiddle Demo
I am providing my Code here too:
HTML:
Male <input type="radio" name="gender" id="male" value="1"> -
Female <input type="radio" name="gender" id="female" value="2">
<br>
<select name="courses" id="courses">
<option value="0">Choose Courses</option>
<option value="1">PHP</option>
<option value="2">Jquery</option>
<option value="3">HTML</option>
</select>
JS:
$(function() {
//these are the values I got, these values are dynamic
var gender = 2;
var course = 3;
}