html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
</head>
<body>
<div class="container">
<h1 class="title">Split Timer</h1>
<h1><span id="timerLabel">00:00.0</span></h1>
<input type="button" class="myButton" onclick="start()" value="Start" id="startBtn">
<input type="button" class="myButton" onclick="stop()" value="Lap">
<input type="button" class="myButton" onclick="reset()" value="Reset">
<table id="table">
<tr>
<th>No</th>
<th>Elapsed</th>
<th>Time</th>
<th>Difference</th>
</tr>
</table>
</div>
<script>
var status = 0; //0:stop 1:running
var time = 0;
var prev = 0;
var elapsedCount = 0;
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
body {
font-family: 'Roboto', sans-serif;
background-color: #3c496d;
color: white;
}
h1 {
font-size: 1.5em;
/*color: black;*/
}
#timerLabel {
display:inline-block;
min-width: 4em;
text-align: left;
}
.container {
margin: auto;
margin-top: 10px;
text-align: center;
}
#table {
margin: 5px;
margin-top: 20px;
font-size: 1.2em;
Enter to Rename, Shift+Enter to Preview
js
js
1
2
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run