以下是网上摘下的文章(未测试但很规范可以模仿)
text
<script> <BR>var chk = 0; <BR>window.onload=function (){ <BR>var chkObjs = document.getElementsByName("radio"); <BR>for(var i=0;i<chkObjs.length;i++){ <BR>if(chkObjs[i].checked){ <BR>chk = i; <BR>break; <BR>} <BR>} <BR>} <BR>function check_radio(){ <BR>var chkObjs = document.getElementsByName("radio"); <BR>for(var i=0;i<chkObjs.length;i++){ <BR>if(chkObjs[i].checked){ <BR>if(chk == i){ <BR>alert("radio</script>