Radio button value
I have a dynamically generated radio button as fiven below
echo '<tr>
<td colspan="2">Login System</td>
开发者_StackOverflow <td colpan="2">
<input type="radio" name="login_system'.$i.'" value="COMMON" checked="checked" />Common  
<input type="radio" name="login_system'.$i.'" value="INDIVIDUAL">Individual
</td>
</tr>';
and i need to take its value using javascript. Below is the code i have written for that
d['login_system']=$('input[name="login_system'+index+'"]').val();
But always I am getting value of first radio button even if I have selected second. Can anyone help me?
$('input[name="login_system'+index+'"]:checked').val()
精彩评论