你给第一题加一个触发事件,如果选A,则:document.getElementById("答案2的ID").disabled=true
否则document.getElementById("答案2的ID").disabled=false就解决了
否则document.getElementById("答案2的ID").disabled=false就解决了
解决方案 »
- removeChild 循环删除结点,删不干净
- 看下这样的JS怎么实现点击放大
- 菜鸟问题,高手救急!
- 用ajax 怎么抓取登录的QQ 号码
- 高手请进:点击按钮后,弹出一对话框,选择文件后,获得该文件的名称,并显示在text框中
- 急……读数据库!!快疯了,帮帮忙……
- http://127.0.0.1/xx/xx/xx.asp,请如何知道判断文件到网址间有多少个“斜杠”.谢谢
- 一个较难的问题-怎样消除滚动条?
- javascript对数据库进行查询时
- 很菜的问题,高分求救,答者有分!(在线等……)
- ●●●●●●●●●●●●●●●●●●●●●●●●●●●这个this是谁啊??? 我又晕了~~~●●●●●●●●●●●●●●●●●●●●●●●●●●●
- JS得到某个参数值的问题。
或者
disabled="disabled"
function whichChange() {
var questions = document.getElementsByName(arguments[0]);
for (var i = 0; i < questions.length; i++) {
questions[i].disabled = arguments[1];
if (arguments[1]) questions[i].checked = false;
}
}
</script>
1. 问题1
<input type="radio" name="q1" onclick="whichChange('q2', true)" />A
<input type="radio" name="q1" onclick="whichChange('q2', false)" />B
<input type="radio" name="q1" onclick="whichChange('q2', false)" />C
<input type="radio" name="q1" onclick="whichChange('q2', false)" />D<br />
2. 问题2
<input type="radio" name="q2" />A
<input type="radio" name="q2" />B
<input type="radio" name="q2" />C
<input type="radio" name="q2" />D<br />
3. 问题3
<input type="radio" name="q3" onclick="whichChange('q4', false)" />A
<input type="radio" name="q3" onclick="whichChange('q4', true)" />B
<input type="radio" name="q3" onclick="whichChange('q4', false)" />C
<input type="radio" name="q3" onclick="whichChange('q4', false)" />D<br />
4. 问题4
<input type="radio" name="q4" />A
<input type="radio" name="q4" />B
<input type="radio" name="q4" />C
<input type="radio" name="q4" />D<br />
5. 问题5
<input type="radio" name="q5" onclick="whichChange('q6', false)" />A
<input type="radio" name="q5" onclick="whichChange('q6', false)" />B
<input type="radio" name="q5" onclick="whichChange('q6', true)" />C
<input type="radio" name="q5" onclick="whichChange('q6', false)" />D<br />
6. 问题6
<input type="radio" name="q6" />A
<input type="radio" name="q6" />B
<input type="radio" name="q6" />C
<input type="radio" name="q6" />D<br />回答时,<br />
第1题选答案A,第2题就不能答<br />
第3题选答案B,第4题就不能答<br />
第5题选答案C,第6题就不能答<br />
=======
如果没有就 style=display:none;