<script language="javascript"> function mira(){ var checks = document.getElementsByName('hola'), i; for (i=0;i<checks.length;i++) if (checks[i].checked) alert(checks[i].value); } </script>