0

I can't seem to find any information on whether what I would like to do is possible or not.

Here is my current code: http://jsfiddle.net/richerdk/zudCf/

Is it possible to have a radio button within the result of another radio button ex:

User selects yes radio button this is the result:

 <div id="div1" class="tab">
    <p>Why do you think the sky is blue, is blue your favorite colour? </p>
</div>

Could I add another yes/no radio button inside of this?

If not how would I go about writing if else statements so I could have different results based on the yes/no selections.

Thanks,

Richerd

4

2 回答 2

0

它是有效的,但您需要为它们设置不同的名称属性,并在不活动时设置为禁用单选按钮,否则将在提交时序列化。服务器端验证也可以。

于 2013-06-18T15:41:50.613 回答
0

使用您当前的代码,您需要更新 nav var

var nav = document.getElementById('nav').getElementsByTagName('input');

http://jsfiddle.net/pjdicke/zudCf/2/

于 2013-06-18T15:50:19.310 回答