Hola, lilico
prueba esto:
Código HTML:
<head>
<script type="text/javascript">
var j=0
var datos = new Array()
</script>
</head>
<body>
<table width="300">
<tr>
<td onClick="this.style.backgroundColor='yellow'; datos[j]=this.innerHTML; j++">A</td>
<td onClick="this.style.backgroundColor='yellow'; datos[j]=this.innerHTML; j++">B</td>
<td onClick="this.style.backgroundColor='yellow'; datos[j]=this.innerHTML; j++">C</td>
</tr>
<tr>
<td onClick="this.style.backgroundColor='yellow'; datos[j]=this.innerHTML; j++">Abc</td>
<td onClick="this.style.backgroundColor='yellow'; datos[j]=this.innerHTML; j++">Bcd</td>
<td onClick="this.style.backgroundColor='yellow'; datos[j]=this.innerHTML; j++">Cde</td>
</tr>
</table>
<a href="javascript:alert(datos)">Mostrar</a>
</body>