5th Oct 2022, 12:42 PM
Antony Blem
Antony Blem - avatar
9 Answers
+ 4
const pr = document.getElementById("pr"); var tmr; window.onload = () => { pr.value = 0; tmr = setInterval(inc, 10); } function inc() { if (pr.value >= 100) clearInterval(tmr); else pr.value++; } https://www.sololearn.com/compiler-playground/W8ok879GF1X4
5th Oct 2022, 1:19 PM
SoloProg
SoloProg - avatar
+ 1
SoloProg It‘s working! Thanks!
6th Oct 2022, 1:56 PM
Antony Blem
Antony Blem - avatar
+ 1
Did you know you can do <progress></progress> It gives a nice animation
7th Oct 2022, 12:58 AM
AJ 🇺🇦#PeaceForUkraine🇺🇦
AJ 🇺🇦#PeaceForUkraine🇺🇦  - avatar
0
Lisa From 1% to 100% (1,2,3,4,5,6,7,8,9,10,11,…)
6th Oct 2022, 1:53 PM
Antony Blem
Antony Blem - avatar
0
SoloProg I cant open your Code
6th Oct 2022, 1:54 PM
Antony Blem
Antony Blem - avatar
0
Like from 0% to 100% with, for example, 0.5 seconds in between each step? Have a look at the examples that I linked. You will need some Javascript and use setInterval or requestAnimationFrame.
6th Oct 2022, 1:56 PM
Lisa
Lisa - avatar
0
Lisa Yes, something like that, but it‘s already solved :)
6th Oct 2022, 2:27 PM
Antony Blem
Antony Blem - avatar
0
🥲
7th Oct 2022, 3:30 AM
Estriba Mary Ann
Estriba Mary Ann - avatar