![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
08/04/2006, 02:37
|
![Avatar de Carlitos](http://static.forosdelweb.com/customavatars/avatar4305_1.gif) | Usuario no validado | | Fecha de Ingreso: mayo-2001 Ubicación: Zaragoza
Mensajes: 1.304
Antigüedad: 23 años, 9 meses Puntos: 25 | |
A ver si te sirve esto:
Código:
<script>
function calcula()
{
hoy = new Date()
hasta = new Date("April 10, 2006 00:00") // Cambiar aquí el valor de la fecha y hora elegida.
dd = (hasta - hoy) / 86400000
document.getElementById('hora').innerHTML = "Faltan " + Math.ceil(dd) + " días"
if (Math.ceil(dd) == 0)
{
document.getElementById('hora').innerHTML = "Día D."
cleartimeout(tictac)
}
else tictac = setTimeout("calcula()",1000)
}
</script>
<div id="hora"><script>calcula()</script></div>
|