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.
Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
I laughed that hard I burst my colostomy bag... (\\.\ May03)
Life for some is like a car accident... Mine is like a motorway pile up...
Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)