5 回答

慕森王
TA贡献1777条经验 获得超3个赞

天涯尽头无女友
TA贡献1831条经验 获得超9个赞
获取选中的radio单选按钮的值:
var v=$(":radio[name='aijquery']:checked").val();
动态选中第一个或最后一个radio单选按钮:
1 2 | $(":radio[name='aijquery']:first").attr("checked","true"); $(":radio[name='aijquery']:last").attr("checked","true"); |
3.动态选中第n个radio单选按钮:
1 | $(":radio[name='aijquery']").eq(3).attr("checked","true"); |
4.动态选中值为7的radio单选按钮:
1 | $(":radio[name='aijquery'][value='7']").attr("checked","true"); |
这里有在线演示:
- 5 回答
- 0 关注
- 1150 浏览
添加回答
举报
0/150
提交
取消