How can I create a timer in html. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

How can I create a timer in html.

13th Oct 2019, 1:36 AM
Shreyansh
Shreyansh - avatar
5 Answers
+ 16
With the setInterval() function: var x = 0; setInterval(function(){ x++; document.write(x); },1000);
13th Oct 2019, 1:59 AM
Jayden LeCorps
Jayden LeCorps - avatar
+ 5
I want to make a digital countdown timer
13th Oct 2019, 2:40 AM
Shreyansh
Shreyansh - avatar
+ 4
have you tried looking at any of the existing countdown timers to get an idea as there are several here to study ?
13th Oct 2019, 2:59 AM
BroFar
BroFar - avatar
+ 3
What type of timer are you referring to: an egg timer, a stop watch, a counter to display the number of folloers,,, there are many types of timers.
13th Oct 2019, 2:35 AM
BroFar
BroFar - avatar
+ 3
I think it's not possible without Javascript.
14th Oct 2019, 12:23 PM
Sonic
Sonic - avatar