|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="en"> |
3 | 3 |
|
4 | | - <head> |
5 | | - <meta charset="UTF-8" /> |
6 | | - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
7 | | - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
8 | | - |
9 | | - <title>End Page</title> |
10 | | - |
11 | | - <script src="../js/end.js" defer></script> |
12 | | - <link rel="stylesheet" href="../css/index.css" /> |
13 | | - <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" |
14 | | - integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous" /> |
15 | | - </head> |
16 | | - |
17 | | - <body> |
18 | | - <div class="container"> |
19 | | - <div id="end" class="flex-center flex-column"> |
20 | | - <h1 id="finalScore">0</h1> |
21 | | - <form class="end-form-container"> |
22 | | - <h2 id="end-text">Enter your name below to save your score!</h2> |
23 | | - <input type="text" name="name" id="username" placeholder="Enter your name" /> |
24 | | - <button class="btn" id="saveScoreBtn" type="submit" onclick="saveHighScore(event)" disabled> |
25 | | - Save |
26 | | - </button> |
27 | | - </form> |
28 | | - |
29 | | - <p class="btn" onclick="goBack(-1)">Play Again</p> |
30 | | - |
31 | | - <p onclick="goBack(-2)" class="btn" target="_blank">Go back to Quiz Home Page Menu<i class="fas fa-home"></i> |
32 | | - </p> |
33 | | - <a href="/rating.html" class="btn" target="_blank">Please rate our quiz!<i class="far fa-star"></i></a> |
| 4 | +<head> |
| 5 | + <meta charset="UTF-8" /> |
| 6 | + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| 7 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 8 | + |
| 9 | + <title>End Page</title> |
| 10 | + |
| 11 | + <script src="../js/end.js" defer></script> |
| 12 | + <link rel="stylesheet" href="../css/index.css" /> |
| 13 | + <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" |
| 14 | + integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous" /> |
| 15 | +</head> |
| 16 | + |
| 17 | +<body> |
| 18 | + <div class="container"> |
| 19 | + <div id="end" class="flex-center flex-column"> |
| 20 | + <h1 id="finalScore">0</h1> |
| 21 | + <div style="color: white; font-size: 30px; margin-bottom: 1rem;"> |
| 22 | + <p>You got <span id="noScore" style="font-size: 30px;">0</span> correct. </p> |
| 23 | + |
34 | 24 | </div> |
| 25 | + <form class="end-form-container"> |
| 26 | + <h2 id="end-text">Enter your name below to save your score!</h2> |
| 27 | + <input type="text" name="name" id="username" placeholder="Enter your name" /> |
| 28 | + |
| 29 | + <button class="btn" id="saveScoreBtn" type="submit" onclick="saveHighScore(event)" disabled> |
| 30 | + Save |
| 31 | + </button> |
| 32 | + </form> |
| 33 | + |
| 34 | + <p class="btn" onclick="goBack(-1)">Play Again</p> |
| 35 | + |
| 36 | + <p onclick="goBack(-2)" class="btn" target="_blank">Go back to Quiz Home Page Menu<i class="fas fa-home"></i> |
| 37 | + </p> |
| 38 | + <a href="/rating.html" class="btn" target="_blank">Please rate our quiz!<i class="far fa-star"></i></a> |
35 | 39 | </div> |
36 | | - </body> |
| 40 | + </div> |
| 41 | +</body> |
| 42 | + |
| 43 | +<script> |
| 44 | + const totalScore = localStorage.getItem("noofquestions"); |
| 45 | + document.getElementById("totalScore").textContent = totalScore; |
37 | 46 |
|
38 | | - <script> |
39 | | - function goBack(n) { |
40 | | - history.go(n); |
41 | | - } |
42 | | - </script> |
| 47 | + function goBack(n) { |
| 48 | + history.go(n); |
| 49 | + } |
| 50 | +</script> |
43 | 51 |
|
44 | 52 | </html> |
0 commit comments