Answer the question
In order to leave comments, you need to log in
How to change data on a button?
Faced such a problem, there is a certain button in it data of 3 types is displayed: 1) send a request 2) timestamp (how much time is left) 3) get the result. All this is interconnected with the database.
I am very interested in the 2nd point (time stamp), how to make the data on the button updated (output time format: 00:00:00), i.e. so that the user can see how much time is left without refreshing the page.
Answer the question
In order to leave comments, you need to log in
setInterval(updateKnopka, 1000)
function updateKnopka() {
/* раз в секунду меняет текст */
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question