Tema: setTimeout
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/02/2005, 08:56
DANICAD
 
Fecha de Ingreso: febrero-2002
Mensajes: 15
Antigüedad: 22 años, 2 meses
Puntos: 0
setTimeout

Tengo problemas para llamar a la funcion setTimeout cuando la funcion que se llamara repetidamente tiene parametros. Este es el codigo, alguna ayuda?
me tira error.
Gracias ([email protected])

<HTML>
<HEAD>

<script type="text/javascript">
function tiempo(ahora){
ahora.setSeconds(ahora.getSeconds()-1);
newtime = window.setTimeout("tiempo("+ahora+");", 1000);
}
</script>

<script type="text/javascript">
function inicio(){
hoy_java = new Date(2005,1,20,11,40,12);
tiempo(hoy_java);
}
</script>

</head>

<BODY onLoad="inicio()">
</body>
</html>