forked from johntango/reactionGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest1.html
33 lines (32 loc) · 947 Bytes
/
test1.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
29
30
31
32
33
<html>
<head>
<SCRIPT>
let startTime = 0.0;
function Start() {
// start the countDown
state = 'green';
let delay = Math.round(Math.random()*10000);
setTimeout(goRed, delay);
}
function goRed(){
startTiming
}
function setColor(c){
}
function writeMessage(m){
document.getElementById("message").value = m
}
function Stop()
}
</SCRIPT>
</head>
<body>
<p>Click on Start Game - when you see red click Stop".</p>
<button class="button button1" id = "b0" onclick="Start()">Start</button>
<div id = "block1" style.backgroundColor='green'>
<button class="button button2" id = "b1" onclick="Stop()">Stop</button>
</div>
<label id = "label">Fastest Reaction Recorded: </label>
<input id = "message"> Your Reaction Time Millesecs </input>
</body>
</html>