Ver Mensaje Individual
  #4 (permalink)  
Antiguo 17/01/2011, 14:02
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 11 meses
Puntos: 1012
Respuesta: Pasar variables para comparar fechas.

puedes hacerlo de varias maneras. como acabo de hacer algo por el estilo, esta es la que he realizado
Cita:
function compare_dates(f){
fch1 = f.elements[0].value;
fch2 = f.elements[1].value;
alert(fch1 + ' ' + fch2)

     }


Formato fecha 1:<input type="text" id="fecha_1" name="fecha_1" title="fecha_1" /><br /><br />  
    Formato fecha 2:<input type="text" id="fecha_2" name="fecha_2" title="fecha_2" onblur="compara_fechas(this.form)" />