
21/08/2006, 05:15
|
 | Moderador extraterrestre | | Fecha de Ingreso: diciembre-2001 Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 2 meses Puntos: 61 | |
Hola maryen!
Bienvenida a los foros!
¿Esto te serviría?
Código:
<html>
<head>
<title>Untitled</title>
<script>
function comprobar(esto){
fecha=esto.value.split("/");
if(fecha.length<3 || fecha[2].length<4){
return false;
}
fechaPuesta=new Date(fecha[2],fecha[1],fecha[0]);
fechaActual=new Date();
if(fechaPuesta<=fechaActual){
alert("Debe poner una fecha posterior!!");
esto.focus();
}
}
</script>
</head>
<body>
<input type="text" name="pepe" id="pepe" value="dd/mm/aaaa" size="10" maxlength="10" onClick="if(this.value=='dd/mm/aaaa')this.value=''" onKeyUp="comprobar(this)">
</body>
</html>
Por cierto, en adelante pon títulos descriptivos del problema en vez de "ayuda" o cosas similares...
__________________ Cómo escribir
No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia. |