djekokma,
чтобы так писать путь к элементу button.b1 должна быть форма с именем button (строка 9)
<!DOCTYPE>
<html>
<head>
<title>Крестики-нолики</title>
<meta charset="utf-8">
</head>
<body>
<form name="button">
<table height="" width="" border="0">
<tr>
<td> <input type="button" name="b1" value="" onclick="event_b1(this)"> </td>
<td> <input type="button" name="b2" value="" onclick="event_b1(this)"> </td>
<td> <input type="button" name="b3"value="" onclick="event_b1(this)"> </td>
</tr>
<tr>
<td><input type="button" name="b4"value="" onclick="event_b1(this)"></td>
<td><input type="button" name="b5"value="" onclick="event_b1(this)"></td>
<td><input type="button" name="b6"value="" onclick="event_b1(this)"></td>
</tr>
<tr>
<td><input type="button" name="b7"value="" onclick="event_b1(this)"></td>
<td><input type="button" name="b8"value="" onclick="event_b1(this)"></td>
<td><input type="button" name="b9"value="" onclick="event_b1(this)"></td>
</tr>
</table>
</form>
<script>
var hod = 0;
function event_b1(button) {
if (button.value) return;
button.value = hod++ % 2 ? "0" : "X";
winning()
}
function winning() {
if (button.b1.value == "X" && button.b2.value == "X" && button.b3.value == "X" || button.b4.value == "X" && button.b5.value == "X" && button.b6.value == "X" || button.b7.value == "X" && button.b8.value == "X" && button.b9.value == "X" || button.b1.value == "X" && button.b5.value == "X" && button.b9.value == "X" || button.b2.value == "X" && button.b5.value == "X" && button.b8.value == "X" || button.b3.value == "X" && button.b6.value == "X" && button.b9.value == "X" || button.b3.value == "X" && button.b5.value == "X" && button.b7.value == "X") alert("Выиграли X");
else if (button.b1.value == "0" && button.b2.value == "0" && button.b3.value == "0" || button.b4.value == "0" && button.b5.value == "0" && button.b6.value == "0" || button.b7.value == "0" && button.b8.value == "0" && button.b9.value == "0" || button.b1.value == "0" && button.b5.value == "0" && button.b9.value == "0" || button.b2.value == "0" && button.b5.value == "0" && button.b8.value == "0" || button.b3.value == "0" && button.b6.value == "0" && button.b9.value == "0" || button.b3.value == "0" && button.b5.value == "0" && button.b7.value == "0") alert("Выиграли 0")
};
</script>
</body>
</html>