Делаю игру "Крестики нолики". Вот его HTML код -
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tic-Tac-Toe</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h3 id="title"></h3>
<div class="playing-field">
<button class="playing-field-item" id="0"></button>
<button class="playing-field-item" id="1"></button>
<button class="playing-field-item" id="2"></button>
<button class="playing-field-item" id="3"></button>
<button class="playing-field-item" id="4"></button>
<button class="playing-field-item" id="5"></button>
<button class="playing-field-item" id="6"></button>
<button class="playing-field-item" id="7"></button>
<button class="playing-field-item" id="8"></button>
</div>
<script src="script.js"></script>
</body>
</html>
Как узнать id кнопки, на которую нажал игрок?