<script> function f(tablName) { alert(tablName) } </script> <table> <tr> <td onclick="f(this)">...текст...</td> </tr> </table>