Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/04/2010, 09:51
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años, 8 meses
Puntos: 1517
Respuesta: validar solo habilitado

Puedes hacerlo algo así
no me deja postear el código
Código HTML:
Ver original
  1. <script type="text/javascript">
  2. function chkRadio(r){
  3.     if(r.pres[0].checked){
  4.         alert('Es el radio del Sí.');
  5.     }else{
  6.         alert('Es el radio del No.');
  7.     }
  8. }
  9. <form action="#" onsubmit="return chkRadio(this.form)">
  10.     Si <input type="radio" name="pres" checked="checked" /><br />
  11.     No <input type="radio" name="pres" />
  12.     <input type="submit" onclick="return chkRadio(this.form)" />
  13. </form>
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos

Última edición por abimaelrc; 26/04/2010 a las 09:58