-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
50 lines (39 loc) · 1.16 KB
/
index.html
File metadata and controls
50 lines (39 loc) · 1.16 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Tic Tac Toe</title>
<link rel="stylesheet" href="style.css">
</head>
<body onload="startGame();">
<h1>Tic Tac Toe in JS</h1>
<div id="message">Message Here</div>
<table >
<tr>
<td class="cell" onClick="nextMove(this)" id="0"></td>
<td class="cell" onClick="nextMove(this)" id="1"></td>
<td class="cell" onClick="nextMove(this)" id="2"></td>
</tr>
<tr>
<td class="cell" onClick="nextMove(this)" id="3"></td>
<td class="cell" onClick="nextMove(this)" id="4"></td>
<td class="cell" onClick="nextMove(this)" id="5"></td>
</tr>
<tr>
<td class="cell" onClick="nextMove(this)" id="6"></td>
<td class="cell" onClick="nextMove(this)" id="7"></td>
<td class="cell" onClick="nextMove(this)" id="8"></td>
</tr>
</table>
<a href="javascript: startGame();" id="restart">Start Over</a>
<div class="gameMessage">
<h4>Player 1: <span id="p1">0</span></h4>
<h4>Player 2: <span id="p2">0</span></h4>
<h4>Number of Game: <span id="gameCount">0</span></h4>
</div>
<div class="endgame">
<div class="text"></div>
</div>
<script src="script.js"></script>
</body>
</html>