window.onload=function(){var boxes=document.getElementsByTagName('input');//检测是否选中for(var i=0;i if(boxes[i].checked){ alert(boxes[i].value+'被选中啦!'); }}}