How to Create Simple Stopwatch in HTML/CSS with JavaScript
Submitted by alpha_luna on Friday, May 20, 2016 - 15:46.
Language
Simple Stopwatch in HTML/CSS with JavaScript
This is an example of a simple stopwatch. It has the ability to keep track on an individual event, especially in a sports event. Try this yourself. This is easy to learn project. It has 3 buttons to operate this stopwatch. These are:- Start
- Stop
- Pause
Source Code
Kindly copy the source code below to your BODY tag.- <section>
- <input type="radio" name="controls" id="start">
- <input type="radio" name="controls" id="stop">
- <input type="radio" name="controls" id="reset">
- <div class="stopwatch">
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- <div class="cell">
- </div>
- </div>
- <div class="control">
- </div>
- </section>
- <script>
- if (document.location.search.match(/type=embed/gi)) {
- window.parent.postMessage('resize', "*");
- }
- </script>
Output:
![Result](https://www.sourcecodester.com/sites/default/files/images/rolynjasper/result_4.png)
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Comments
Add new comment
- Add new comment
- 3608 views