Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/05/2013, 14:52
Avatar de bulter
bulter
 
Fecha de Ingreso: enero-2008
Mensajes: 137
Antigüedad: 16 años, 4 meses
Puntos: 20
Respuesta: Dudas con el radio button

Eeee esto no es para el foro PHP , mas bien Javascript, no se si te entendí bien, pero mira si esto es lo que necesitas ?!

Código HTML:
Ver original
  1.     <head>
  2.         <title>
  3.             ...
  4.         </title>
  5.         <script type="text/javascript">
  6.             function ResetRadioBtns()
  7.             {
  8.                 var radioBtnObj = document.radioForm["radioExample"];
  9.                
  10.                 for(var i = 0; i < radioBtnObj.length; i++)
  11.                 {
  12.                     document.radioForm["radioExample"][i].checked = false
  13.                 }
  14.             }
  15.         </script>
  16.     </head>
  17.     <body> 
  18.         <form action="" name="radioForm" method="POST">
  19.             <input type="radio" name="radioExample"  /> Val 1<br />
  20.             <input type="radio" name="radioExample"  /> Val 2<br />
  21.             <input type="radio" name="radioExample"  /> Val 3<br />
  22.             <input type="radio" name="radioExample"  /> Val 4<br />
  23.             <input type="radio" name="radioExample"  /> Otros<br />
  24.             <input type="button" value="Reset" onClick="ResetRadioBtns();" />
  25.         </form>
  26.     </body>
  27. </html>