The problem statement is simple.
(问题陈述很简单。)
I need to see if user has selected a radio button from a radio group. (我需要查看用户是否已从广播组中选择了一个单选按钮。)
Every radio button in the group share same id. (组中的每个单选按钮共享相同的ID。)
The problem is that I don't have control on how the form is generated.
(问题是我无法控制表单的生成方式。)
Here is the sample code of how a radio button control code looks like: (这是单选按钮控制代码的示例代码:)
<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) .
(除此之外,当选择单选按钮时,它不会向控件添加“ checked”属性,而只是对文本进行检查 (我猜只是对属性进行了检查,没有值) 。)
Below is how a selected radio control looks like (以下是选定的无线电控件的外观)
<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 >
Can anybody help me with jQuery code that can help me to get the value of checked radio button?
(有人可以帮助我使用可以帮助我获取选中的单选按钮值的jQuery代码吗?)
ask by user1114212 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…