-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (31 loc) · 1.18 KB
/
index.html
File metadata and controls
31 lines (31 loc) · 1.18 KB
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>
<head>
<title>Tic Tac Toe</title>
<link rel="stylesheet" href="css/style.css">
<script src="js/main.js"></script>
</head>
<body>
<h2>Tic Tac Toe</h2>
<h1>player 1: X</h1>
<h1>player 2: O</h1>
<p class="label">Select starting player:</p>
<select onchange="changeStartingPlayer()" id="starter">
<option value='1'>player 1</option>
<option value='2'>player 2</option>
</select>
<div id="buttons">
<button id="1" onclick="addInGrid(1)"></button>
<button id="2" onclick="addInGrid(2)"></button>
<button id="3" onclick="addInGrid(3)"></button><br>
<button id="4" onclick="addInGrid(4)"></button>
<button id="5" onclick="addInGrid(5)"></button>
<button id="6" onclick="addInGrid(6)"></button><br>
<button id="7" onclick="addInGrid(7)"></button>
<button id="8" onclick="addInGrid(8)"></button>
<button id="9" onclick="addInGrid(9)"></button>
</div>
<button id="reset" onclick="resetGrid()">Reset grid</button>
<p id="winner"></p>
</body>
</html>