This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
setTimeout dynamisch möglich?
#1
Question 
Hallo, kann ich diese form anwenden ? es funktioniert nämlich nicht...


var timeLine = 1000;
setTimeout(function(){

//code
 
 }, timeLine);

vielen dank für die Hilfe.
Zitieren
#2
Klar kann man das machen.
Mach doch mal Alert rein , dann siehst du das es geht.

var timeLine = 1000;
setTimeout(function(){

alert(timeLine)

}, timeLine);



Falls es so bei dir nicht geht , muss da noch ein anderer Fehler sein.
Wenn da noch mehr Code ist, könnte da schon ein Error sein und somit ist der Rest Javascript Code um brauchbar.
Schau mal in der Konsole ob irgendwo schon Fehler sind
Als Lösung markieren Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste