-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
51 lines (48 loc) · 1.79 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta="viewport" content="width=device-width,initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Guess The Number Game</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body onload="init()">
<main>
<div id="welcomeScreen">
<h2> Guess the random number <br />between 1-100</h2>
<section>
<p>Select difficulty setting:</p>
<div class="button-wrapper">
<button onclick="easyMode()">Easy: 10 attempts</button>
<button onclick="hardMode()"> Hard: 5 attempts</button>
</div>
</section>
</div>
<div id="gameArea"></div>
<button id="newGameButton" onclick="newGame()">NEW GAME</button>
<section>
<h3 id="textOutput">Your Guess:</h3>
<input type="number" id="inputBox" min="1" max="100" onchange="compareGuess()" />
<section>
<p>Current range:</p>
<span id="rangeOutput">1 - 100</span>
<div id="range">
<span id="low"></span>
<span id="space"></span>
<span id="high"></span>
</div>
<section class="stats">
<div class="info">
<p>Number of previous attempts:</p>
<span id="attempts">0</span>
<div class="info">
<p>Number of previous guesses:</p>
<span id="guesses">-</span>
</div>
</section>
</div>
</main>
<script src="script.js"></script>
</body>
</html>