-
Notifications
You must be signed in to change notification settings - Fork 2
/
result.html
66 lines (54 loc) · 2.26 KB
/
result.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
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Novice Trek</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://meyerweb.com/eric/tools/css/reset/reset.css">
<link href="https://fonts.googleapis.com/css?family=Song+Myung" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="assets/css/result.css" />
<title>Result Page</title>
</head>
<body>
<div id="background"></div>
<h1 id="h1t">🍿 Advanced Trek 🍿</h1>
<h2 id="tag">Guess the Movie Name from Picture</h2>
<button onclick="redirectToGifGame()" class="start" > 🎥 START AGAIN! 🎬</button>
<button onclick="redirectToEmojiGame()" class="start" > 🎥 Novice Trek! 🎬</button>
<div id="ticketContainer">
<img id="ticket" src="assets/images/ticket.png">
<h3 id="emoji"></h3>
<h3 id="qNum"></h3>
<div id="results">
<h3id="done">Trivia Completed! Here's how you did!</h3>
<div id="correct">
<h3>Correct Answers</h3>
<h3 id="corNum"></h3>
</div>
<div id="incorrect">
<h3>Incorrect Answers</h3>
<h3 id="incorNum"></h3>
</div>
</div>
</div>
<script>
// JavaScript to retrieve the score values from the previous page
const urlParams = new URLSearchParams(window.location.search);
const correct = localStorage.getItem('correct');
const total = localStorage.getItem('total');
// Perform the desired operations with the retrieved values
const incorrect = total - correct;
// Display the results on the page
document.getElementById('corNum').innerText = `${correct}`;
document.getElementById('incorNum').innerText = `${incorrect}`;
function redirectToGifGame() {
window.location.href = "AdvancedTrek.html";
}
function redirectToEmojiGame() {
window.location.href = "NoviceTrek.html";
}
</script>
</body>
</html>