Answer the question
In order to leave comments, you need to log in
Sequential selection, how to make a check?
<script>
function a() {document.getElementById('info1').style.display='block';}
function b() {document.getElementById('info2').style.display='block';}
function c() {document.getElementById('info3').style.display='block';}
</script>
<input type="radio" name="1" onChange="a()">1
<input type="radio" name="1" onChange="b()">2
<input type="radio" name="1" onChange="c()">3
<br>
<div id="info1" style="display:none">
<label><input name="2" type="radio" value="Да" />1Да</label>
<label><input name="2" type="radio" value="Нет" />1Нет</label>
</div>
<div id="info2" style="display:none">
<label><input name="3" type="radio" value="Да" />2Да</label>
<label><input name="3" type="radio" value="Нет" />2Нет</label>
</div>
<div id="info3" style="display:none">
<label><input name="4" type="radio" value="Да" />3Да</label>
<label><input name="4" type="radio" value="Нет" />3Нет</label>
</div>
</form>
Answer the question
In order to leave comments, you need to log in
Create a function like this
var elems = document.getElementsByTagName("div");
for (var i = 0; i<elems.length; i++) {
elems[i].style.display = 'none';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question