I figured out how to build a stopwatch but this I can't figure out - any have any live examples to demonstrate? I am stuck on the custom integer that the user can enter...
To get the custom integer from the user you can use the prompt box, input tag... anything user can interact with and set, choose... a value. Use the setInterval function to run a custom function (which will do the job) every second (that is 1000 ms).
Implementing the Reset button is fairly easy. Let's say you choose a h1 tag as a display. When user clicks the Reset button simply set h1's value to 0.
You will find plenty of examples on the internet, not being rude but this sounds homeworky type question, something that crops up regular, stopwatch / count down timer, dice roll and other scripts that are designed to test coders skills.
So, try looking for something that does what you need and modify it so that you know what is happening so that when asked, you can explain how it functions.
Please remember to wrap any code you have in forum tags:-
[CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]
If you can't think outside the box, you will be trapped forever with no escape...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)