问题陈述很简单。我需要查看用户是否从单选组中选择了单选按钮。组中的每个单选按钮共享相同的 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 >
In addition to this when a radio button is selected it doesn't add a "checked" attribute to the control just text checked (I guess just the property checked without a value) . 以下是所选无线电控件的外观
<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 >
任何人都可以帮助我使用 jQuery 代码来帮助我获得选中单选按钮的值吗?