javascript incrementing a counter with a button

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

really useful video, I looked at seven other videos that left me in the dark before this one worked immediately .

adomwest
Автор

Thank you for this! Nice clear concise and all done within one document.

Chris-fhqv
Автор

How would I add commas to the count for big numbers?

hopetangunu
Автор

Thanks for this.



I got tripped up at the other function for a couple days, but then started reducing code to the bare minimum to get it working and then I was able to figure it out.

calebskinner
Автор

refresh page once should not start from 5 again. It should start from the current value only??

krushnabelokar
Автор

does the updated number remains when you close the browser?

RosalitoUdtohan_
Автор

what if i wanted to store those numbers in mysql?

ricardoduarte
Автор

I did it before but iwant to include it in local storage.
Because when i reload it
an click again the value of locale storage =no thing again
Please help me if you can

codermomo
Автор

can you help make it minus 1 and that it cant be negative?

anonwithamnesia
Автор

If you would like to reset it the counter back to 0 at let say click #10, would you write a function reseting the button? If so, how would you go about it since you didn't create a variable that would increase as you click. Something like var counter= 0; or am I just confusing my self? haha. Btw, thank you! It worked great for me :D

alexandervidal