Given a button. Given a paragraph whose text is a number. By clicking on the button, start a timer that every second will increase the text of the paragraph by 1
.
Given a button. Given a paragraph whose text is a number, for example, 10
. By pressing the button, start the timer, which every second will decrease the text of the paragraph by 1
. As soon as the value of the paragraph becomes zero - stop the timer.
Given an input with a number. Make it so that every second the square of the number that is written in it appears in it.
Given an input. A number is entered into it. When focus is lost, set the paragraph below to start counting down from the number entered. When the countdown reaches zero, it must end.
Given an input, a button, and a paragraph. A number is entered into the input. By pressing the button, write the entered number into the text of the paragraph and start the countdown in the paragraph: let the number in the paragraph decrease by one every second until it reaches zero.
Given a paragraph and two buttons. Make it so that when you click on the first button in the paragraph, the timer starts ticking from 1
to infinity, and when you click on the second button, the timer stops.
Given a paragraph. Make it so that every second it changes its color from red to green and vice versa.
If you display the current moment of time on the screen every second, you can make a ticking clock. Implement the same clock as shown in the sample below: