开发者

Radio button value

开发者 https://www.devze.com 2023-02-02 19:35 出处:网络
I have a dynamically generated radio button as fiven below echo \'<tr> <td colspan=\"2\">Login System</td>

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 &nbsp
                                 <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()

0

精彩评论

暂无评论...
验证码 换一张
取 消