-->

两个单选按钮一次选择(Two radio buttons are selecting at once

2019-10-17 02:40发布

我在增加一个单选按钮div JSP页面。 但是,新添加的单选按钮总是选择,当我在第二个单选按钮点击,它也要去选择。 是否有任何脚本来写这个。

<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>

图像附:

Answer 1:

你应该有一个相同的值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>

希望这可以帮助



Answer 2:

我已经进入了错误的名称,而不是下面给出..

<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如下单选按钮也具有。 那么只有它是工作。

谢谢..



文章来源: Two radio buttons are selecting at once
标签: html jsp struts