两个单选按钮一次选择
问题描述:
我在jsp页面的div
中增加了一个单选按钮。但新添加的单选按钮始终选中,当我点击第二个单选按钮时,它也将选择。是否有任何脚本来写入这个。两个单选按钮一次选择
<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
属性,即property="questionnaire.RP2462.posEntryModeCd"
所有三个:
<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>
希望这有助于
答
我输入错误的名称,而不是下面给出..
<html:radio name="caseForm" property="questionnaire.RP0062.posEntryModeCd" value="A" styleId="posEntryModeCda"> 05 - Chip Card read (data is reliable)</html:radio> </div>
上述我应该给questionnaire.RP2462.posEntryModeCd
如下单选按钮还具有。然后只有它工作。
谢谢..
请出示您的实际HTML输出,而不是您的Java源代码。附有图片的 – 2012-07-27 14:12:56
。 – Mdhar9e 2012-07-27 14:21:51
我相信@Diodeus意味着**生成的** HTML输出:)在浏览器中右键单击页面并执行*查看源代码*。 – BalusC 2012-07-27 14:23:17