小编use*_*212的帖子

jQuery获取所选单选按钮的值

问题陈述很简单.我需要查看用户是否从广播组中选择了一个单选按钮.组中的每个单选按钮共享相同的ID.

问题是我无法控制表单的生成方式.以下是单选按钮控件代码的示例代码:

<input type="radio" name='s_2_1_6_0' value='Mail copy to my bill to address' id = "InvCopyRadio" onchange = 'SWESubmitForm(document.SWEForm2_0,s_4,"","1-DPWJJF")' style="height:20;width:25" tabindex=1997 >
Run Code Online (Sandbox Code Playgroud)

除此之外,当选择单选按钮时,它不会向控件添加"已选中"属性,只是选中 了文本(我猜测只检查了没有值的属性).以下是所选无线电控制的外观

<input type="radio" checked name='s_2_1_6_0' value='Mail copy to my bill to address' id = "InvCopyRadio" onchange = 'SWESubmitForm(document.SWEForm2_0,s_4,"","1-DPWJJF")' style="height:20;width:25" tabindex=1997 >
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮助我使用jQuery代码,可以帮助我获得已检查单选按钮的值吗?

jquery siebel radio-button

507
推荐指数
20
解决办法
106万
查看次数

标签 统计

jquery ×1

radio-button ×1

siebel ×1