Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/07/2003, 15:10
Avatar de biblio
biblio
 
Fecha de Ingreso: enero-2002
Ubicación: Urano
Mensajes: 577
Antigüedad: 23 años, 2 meses
Puntos: 0
Ajá, te pillé por acá.

Código:
<html>
<head>
<SCRIPT>
var interval = "";
var i = 5;
function startInterval(){
    interval = window.setInterval("tTimer()",1000);
} 
function stopInterval(){
    window.clearInterval (interval);
    interval="";
}
function tTimer(){
    document.f.display.value = i--;
    if (i == -1)
    {
        stopInterval();
        alert ("tiempo terminado");
    }
}
</SCRIPT>
</head>
<body>
<form name=f>
	<input type=text name=display value="">
</form>
<script>
	startInterval();
</script>
</body>
</html>
Creo que se adapata a tu pedido, la cuenta es regresiva, el código está muy simple y fácil de entender. No veo que puedas tener problemas.

Aunque leyendo bien tu pregunta te estoy dando gato por liebre así se dice creo.

http://www.javascript-page.com/timer.html

En ese enlace hay un ejemplo con minutos, y se no se adapta ninguno a tu necesidad lo crearemos otro.

Última edición por biblio; 26/07/2003 a las 15:16