<form>
<input type=radio name=stu value=1>1
<input type=radio name=stu value=2>2
<input type=radio name=stu value=3>3
<input type=radio name=stu value=4>4
<input type=button onclick=slt(this.form) value=slt>
</form>
<script language=vbs>
function slt(frm)
for each e in frm
if e.name="stu" and e.type="radio" and e.checked then
window.location="stuAdd.asp?stuNo="+e.value
exit for
end if
next
end function
</script>

解决方案 »

  1.   

    vs中也是这么写吗?window.location="stuAdd.asp?stuNo="+e.value
    ,不是用response.write "stuAdd.asp?stuNo='" & request("stu") & "'"吗?另外<input type=radio name=stu value=1>1
    <input type=radio name=stu value=2>2
    <input type=radio name=stu value=3>3
    <input type=radio name=stu value=4>4
    是通过asp生成的,不是直接在页面上的,所以还是要用到var i=0;i<frm.elements.length;i++){ 
      var e = frm.elements[i];,这里怎么变,,
      

  2.   

    response.write 是 ASP 里面的.
    vbs 里一样可以用window.location="..."
    for i=0 to i<frm.elements.length step 1
    e = frm.elements[i]'这个还是可以继续用的.
    next