Jump to content
php.lv forumi
  • 0

settimeout probleema


vaiiii

Question

Problēma tāda ka

 

abc = 1;

 

lala(abc);

 

function lala(abc){

setTimeout(funkcijacita(abc),1000);

}

 

function funkcijacita(abc){

te visadas funkcijas

lala(abc);

}

 

 

doma tada ka funkcijacita ir japalaiz ik pec sekundes kad ta funkcija ir izpildijusies

bet problema ir tur ka vina neatjaunojas ik pec sekundes bet atjaunojas uzreiz pec izpildes, nesaprotu

kapec timeout nestrādā uz 1 sekundi, meginaju ari setinterval, ari nestrādāja!

Varbūt kāds zin kur varētu būt problēma?

 

palaizot to pasu lala pasaa sakumaa nepaiet sekunde kad jau palaiz funkcijacita, bet kur tajaa koda var but problema es ari nesaprotu, tikai viena rinda tajaa lala funkcijaa..

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...