0
I’m trying to make a code that when the page loads it starts counting and ends at the number I want,
I know how to stop the loop,
I tried using setTimeout()
function carregar (){
var c = 0;
setTimeout (function (){
document.getElementById("htmlp").innerHTML = c + "%";
c = c + 1;
}, 1000);
}
tried the same thing with setInterval() since it is a loop but it did not give in anything tbm
And where’s the number
60
that you want to finish counting?– Sam
I was going to explain there but I forgot,I already know how to stop the counting, I just don’t know how to start it. Every 1 second add +1 and go to 2 tlgd? That one I couldn’t do.
– THΔLES