Código HTML:
<table>
<tr><td id="texto">Texto seleccionado</td></tr>
</table>
<a href="#" onclick="seleccionar()">Seleccionar</a>
<script type="text/javascript">
function seleccionar()
{
var tdtexto = document.getElementById("texto");
var texto = tdtexto.text;
alert(texto);
}
</script>