jquery中获得选中了的radiobutton元素

来源:互联网 发布:淘宝联盟怎么自推自买 编辑:程序博客网 时间:2024/05/22 00:42

<table border="0" id="rdoList">
 <tbody><tr>


  <td><input type="radio" checked="checked" value="1001" name="rdoList" id="rdoList_0"><label for="rdoList_0">A计划</label></td>

<td><input type="radio" value="1002" name="rdoList" id="rdoList_1"><label for="rdoList_1">B计划</label></td>

<td><input type="radio" value="1003" name="rdoList" id="rdoList_2"><label for="rdoList_2">C计划</label></td>


 </tr>
</tbody></table>

html部分页面如上。想获取选中的radiobutton的值。

js代码如下:

$("#rdoList').change(function(){

var m=$(this).find("input [name='rdoList'] :checked");

alert(m);

});

原创粉丝点击