Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30/09/2008, 11:50
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años, 9 meses
Puntos: 834
Respuesta: setTimeout i Bucles incompatibles ?

Probá así:
Código PHP:
<script>
var 
tiempo=3000;
for(
i=0;i<=5;i++){
  (function(){
      var 
valor=i;
      var 
valor1=0;
      
setTimeout(function(){alert("valores: "+valor+" "+valor1);},tiempo);
  })();
}
</script>