-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdice.html
42 lines (42 loc) · 1.29 KB
/
dice.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
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Javascript Dice Game</title>
<link rel="stylesheet" href="stylesheet.css"/>
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<header>
<h1>a simple javascript dice game</h1>
<h2>(<a href="https://github.com/PsychicCat/dice" target="new">github</a>)</h2>
</header>
<main>
<div class="content">
<section>
<p id="text">Choose a number 1-6, or random roll!</p>
<ul>
<li><button onclick="counter(); setNumber(1)">1</button></li>
<li><button onclick="counter(); setNumber(2)">2</button></li>
<li><button onclick="counter(); setNumber(3)">3</button></li>
<li><button onclick="counter(); setNumber(4)">4</button></li>
<li><button onclick="counter(); setNumber(5)">5</button></li>
<li><button onclick="counter(); setNumber(6)">6</button></li>
<li><button onclick="counter(); setNumber(rollDice())">Random</button></li>
</ul>
</section>
<article>
<p id="yourRoll">Your Roll:</p>
<p id="myRoll">My Roll:</p>
</article>
<footer>
<p id="result"></p>
<h3>Stats:</h3>
<ul>
<li><p id="counter">Games Played: </p></li>
<li><p id="winloss">Wins / Losses: 0 / 0</p></li>
<li><p id="percent">Win Percentage:</p></li>
</footer>
</div>
</main>
</body>
</html>