djekokma,
<!DOCTYPE>
<html>
<head>
<title>Крестики-нолики</title>
<meta charset="utf-8">
</head>
<body>
<form>
<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";
}
</script>
</body>
</html>