+ 3
Why wont this work?
I have this code here var x="0%"; var m="100%"; var y="5%"; function progp() { var fill=document.getElementById("prog_fill").style.width if(x<m){ x=x+y; } fill=x; } and i want that everytime the function progp() is called the width (i set width to fill) will increse by 5% please help me
7 Réponses
+ 2
little changes for you
https://code.sololearn.com/W1K1AwLWP9n5/?ref=app
+ 3
thank you so much
+ 3
ohh its great thank you
+ 2
var x=0,
m=100,
y=5
function progp(){
var fill = document.getElementById("prog_fill");
x= x<m?x+y:m;
fill.style.width = x +"%"
}
+ 2
you can ask me anytime
+ 2
thats my finished code :D
https://code.sololearn.com/WI2NNA80ijmH/?ref=app
+ 2
nice