jQuery获得radio的值的方法

radio如下:

1 <input type="radio" value="Manager"name="login_type"/>
2 <input type="radio"value="User"name="login_type"checked/>

要想获得上面radio的值,可以用以下两种方法:

1、

1 $(':radio:checked').val()

2、

1 $('input[name="login_type"]:checked').val()

 

posted @ 2013-01-26 20:33  greywardens  阅读(167)  评论(0编辑  收藏  举报