就差这一点了!!!
rlpp 2005-03-29 02:06:28 <script language=vbscript>
sub change_value()
if document.myform.="q1"(0).checked then document.form1.a1.value=1
if document.myform.="q1"(1).checked then document.form1.a1.value=2
if document.myform.="q1"(2).checked then document.form1.a1.value=3
if document.myform.="q1"(3).checked then document.form1.a1.value=4
end sub
</script>
<BODY>
<form action=index2.asp?action=chk name="myform" method=post>
<input type="radio" value="1" name="q1" onclick=change_value()>A</font>:<%=question("A选项")%><br>
<input type="radio" value="2" name="q1" onclick=change_value()>B</font>:<%=question("B选项")%><br>
<input type="radio" value="3" name="q1" onclick=change_value()>C</font>:<%=question("C选项")%><br>
<input type="radio" value="4" name="q1" onclick=change_value()>D</font>:<%=question("D选项")%><br>
</form>
<form name="form1" method="post" action="">
<input type="text" name="a1" readonly>
</form>
我这段代码主要实现是在单选框中选中的内容再显示出来
问题是把上面代码的“q1”换成ans<%=id%>就不行了
还有我上面的1234可以换成abcd吗?
</BODY>