以下是網路上摘下的文章(未經測試但很規範可以模仿)
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].jschecked) { <BR>if(chk == i){ <BR>alert("radio</script>