I have that inputs:
<input type="radio" name='lang' value='3' />
<input type="radio" name='lang' value='4' />
I try to get the value of the selected radio button. To do so, I’m using the code
$(‘input[name=”lang”]’).val()
but it always returns 3. Why ?
It always returns “3” because it returns the first it finds.
To get the checked one, use: