0
I tried to reload my html page (having some animation with setinterval) but it is not working perfectly.
document.write(document.documentElement.outerHTML); document.close(); i used this👆but after it reloads , it is increasing my animation speed.....how can i fix it??I am a newbie so please help......🙏
12 Réponses
+ 5
code?
+ 4
Try clearing the interval using
clearInterval(interval)
where interval is the variable name for your interval
+ 4
clearInterval(interval);
interval = setInterval(draw, 16);
?
+ 2
its not working bro.....its still getting faster each time i reload😢
+ 2
there is a function "draw()" which i run with
setInterval(draw,16);
+ 2
its not working.i have made the code public named "backup".check pleasee.......thank u in advance
+ 2
it wud be okay if anyone can tell any alternate method to reload the page.
+ 2
when i add clearInterval(interval); in my code.it doesnt work
+ 2
how??can u explain? or u fixed something else too?
+ 2
in my code when i add that line , it says interval isn't defined
+ 2
ohh i got it.....thanks a lot mr. the coding sloth..