The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Much Help Needed! – Javascript Stopwatch

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #35409

    Hey guys,

    I really need some help big time with this and from poking around in these forums, I can see that you are all very knowledgeable, so I am turning to you for help.

    I found a code for a javascript stopwatch from 2009 in these forums. Here it is with just a little modification from me:


    So, it’s great for what it does and I love the look of it as it is now, but I just need some added functionality.

    1st – I need to be able to tell it to start without the use of buttons, or without it automatically starting the way it is doing now. I just need the numbers on screen and nothing else. I was thinking of just using the Spacebar.

    2nd – I need to be able to set intervals of time. So I need to tell it to start (spacebar), it goes for a set period of time and then stops automatically. Then after another set period of time, it starts again automatically. I need this to happen several times and I need the time to be cumulative. So I need the total time to always show instead of it resetting.

    That’s basically it. I know very little code and have been struggling to find resolutions to the problem. It seems there are many ways to make a Javascript Stopwatch and that is throwing me for a loop when trying to piece together code.

    Thank you so much for taking the time to look at this and hopefully we can find a solution.




    hours0 minutes0 seconds0 milliseconds0

    current cycle

    hours0 minutes0 seconds0 milliseconds0

    You need to change the value of “interval” and “countdown” in line 33/34 to your needs.


    Thanks a lot ingo! Unfortunately, your code didn’t work to well but I was able to use the keyboard start and stop code you wrote and that has been very helpful so far!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.