Answer the question
In order to leave comments, you need to log in
Counter script like 0.00000, how to do it when registering an account?
Hello. I tried to make a counter after logging into the account.
For example, you logged into your account and see a counter of the format 0.00000, you need to make it so that when you add a certain amount, it increases by the specified number.
In general, for example, the counter works at a speed of +2 per second, when replenishing the balance, the condition is 1 rub = 0.00003
, that is, if you replenish in the amount of 1 ruble, the speed of the counter increases and it is already dialed not 0.00002 per second, but 0.00005 per second
Answer the question
In order to leave comments, you need to log in
There are examples here to start with to find a solution:
https://www.electrictoolbox.com/using-settimeout-j...
Here, in the first answer, more modern and simpler:
https://stackoverflow.com/questions /6893130/how-to...
https://jsfiddle.net/89tvu08L/13/
updateCount() must be called on replenishment. It's just a frontend. I suspect that this data will then be accepted, processed and stored somewhere - do not forget to properly check them at the entrance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question