Aetae, на всякий))
<script type="text/javascript">
window.onload = function() {
table = document.getElementById('table'), tr = table.rows, i = tr.length;
while(i--) {
td = tr[i].cells, j = td.length;
while(j--) {
td[j].onclick = (function(i, j) {
return function() {
alert(i+'x'+j); //tr[i].rowIndex+'x'+td[j].cellIndex
};
})(i, j);
}
}
};
</script>
<style type="text/css">td {width: 20px; height: 20px; background:#ddf; border: 1px solid #99c; }</style>
<table id="table">
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
</table>