Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/07/2009, 02:05
crujikoki
 
Fecha de Ingreso: diciembre-2007
Ubicación: Barcelona
Mensajes: 289
Antigüedad: 17 años, 2 meses
Puntos: 8
Respuesta: cuenta regresiva

Hola,

He modificado un poco este ejemplo de W3schools a ver si es lo que buscas:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
var 
c=30;
var 
t;
function 
timedCount()
{
    
document.getElementById('txt').value=c;
    
c=c-1;
    if(
c>=0)
    {
        
t=setTimeout("timedCount()",1000);
    }
}
</script>
</head>

<body>
<form>
<input type="button" value="Start count!" onClick="timedCount()">
<input type="text" id="txt">
</form>
<p>Click on the button above. The input field will count for ever, starting at 0.</p>
</body>

</html> 
Lo de evitar que te puedan refrescar la pàgina, la verdad que no se me ocurre. A ver si alguno de los cracks te ayuda en ello!

Saludos.