Visualizzazione dei risultati da 1 a 4 su 4

Discussione: ciclo for a tempo

  1. #1

    ciclo for a tempo

    ciao a tutti... è possibile fare un ciclo for cosi, ma a tempo... nel senso che fa un ciclo ogni secondo?

    Codice PHP:
    for (k=0k<=8k++){
        
    trace ("ciclo numero:"+k);

    grazie!

  2. #2
    There is nothing conceptually better than Rock 'n' Roll.

    poker is very much like sex. most people think they're the best but don't know what they're doing.

  3. #3
    cavoli pero' funziona con action script 3, mentre io lo devo mettere in un sito che ha il 2

  4. #4
    Utente di HTML.it
    Registrato dal
    Dec 2008
    Messaggi
    72
    puoi usare setInterval, e richiami ogni tot millisecondi una funzione che fa quello che vuoi. ci aggiungi una variabile che fa da contatore e quando arrivi ad un certo numero con clearInterval cancelli setInterval

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.