本文介绍了两个单选按钮一次选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在jsp页面的 div 中增加了一个单选按钮。但新添加的单选按钮始终选中,当我点击第二个单选按钮时,它也将选择。
i am adding one more radio button in a div of jsp page. But the newly added radio button is selecting always and when i click on second radio button, it is also going to select. is there any script to write to this.
<div style="padding-left:15px"> <div> Entry Mode Code was: </div> <div style="padding-left:30px"> <div> <html:radio name="caseForm" property="questionnaire.RP0062.posEntryModeCd" value="A" styleId="posEntryModeCda"> 05 - Chip Card read (data is reliable)</html:radio> </div> <div> <html:radio name="caseForm" property="questionnaire.RP2462.posEntryModeCd" value="B"> 90 - Magnetic Stripe Terminal and the full unaltered contents of the selected track is included</html:radio> </div> <div> <html:radio name="caseForm" property="questionnaire.RP2462.posEntryModeCd" value="C" > Not Applicable</html:radio> </div> </div> </div>
附图:
推荐答案
您应该拥有相同的值所有三个单选按钮的属性属性,即 property =questionnaire.RP2462.posEntryModeCd
You should have the same value for the property attribute of all the three radio buttons, i.e. property="questionnaire.RP2462.posEntryModeCd" for all the three:
<div> <html:radio name="caseForm" property="questionnaire.RP2462.posEntryModeCd" value="A" styleId="posEntryModeCda"> 05 - Chip Card read (data is reliable)</html:radio> </div> <div> <html:radio name="caseForm" property="questionnaire.RP2462.posEntryModeCd" value="B"> 90 - Magnetic Stripe Terminal and the full unaltered contents of the selected track is included</html:radio> </div> <div> <html:radio name="caseForm" property="questionnaire.RP2462.posEntryModeCd" value="C" > Not Applicable</html:radio> </div>
希望这可以帮助您
这篇关于两个单选按钮一次选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!