This demo uses JavaScript to get the hours, minutes, and seconds from the same source as the clock that can be displayed on the Windows desktop. After it determines whether it's AM or PM, it plugs the info into the text box above. Each time the clock is started, the current time is obtained. That's why if you click on STOP then wait a few seconds then click START, you will see a jump to the new time.