-
Notifications
You must be signed in to change notification settings - Fork 0
/
highscore.html
31 lines (31 loc) · 925 Bytes
/
highscore.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>High Scores</title>
<script>
function goBack() {
window.history.back();
}
function clearHighscores() {
window.localStorage.clear(); /* change this to clear high scores array that has initials and related score*/
document.getElementById("highscores").innerHTML = "";
}
</script>
</head>
<body>
<h1>Highscores</h1>
<div class="wrapper">
<div class="inner">
<ul id="highscores">
<!-- high scores will be inserted here in a for loop -->
<li>1. Initials - Score</li>
/* example */
</ul>
<button onclick="goBack()">Go Back</button>
<button onclick="clearHighscores()">Clear Highscores</button>
</div>
</div>
</body>
</html>