-
Notifications
You must be signed in to change notification settings - Fork 0
/
tngTemplate.html
56 lines (50 loc) · 1.16 KB
/
tngTemplate.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>TNG True or False</title>
<link rel="stylesheet" href="style.css">
</head>
<script>
var score = 0;
var clicked = [];
function raiseScore() {
var scoreBox = document.getElementById("scorebox");
var x = document.getElementsByClassName("true1");
score += 1;
scoreBox.innerHTML = "Score: " + score;
}
function lowerScore() {
var scoreBox = document.getElementById("scorebox");
var x = document.getElementsByClassName("true1");
score += -1;
scoreBox.innerHTML = "Score: " + score;
}
function raiseButton(id) {
if (clicked.includes(id)){
;
}
else{
clicked.push(id);
raiseScore();
}
}
function lowerButton(id) {
if (clicked.includes(id)){
;
}
else{
clicked.push(id);
lowerScore();
}
}
</script>
<body>
<center>
<h1 id="scorebox">Score: 0</h1>
<div id="purple">
<h1><span class="blink">✦</span> Is this line from Star Trek: The Next Generation generated by a Markov Chain or taken straight from the series?</h1>
</div>
@
</body>
</html>