Possible Duplicate:
How to detect which row [ tr ] is clicked?
I have a table like this:
<table>
<tr>
<td>1</td><td>1</td><td>1</td>
</tr>
<tr>
<td>2</td><td>2</td><td>2</td>
</tr>
<tr>
<td>3</td><td>3</td><td>3</td>
</tr>
</table>
In JavaScript (no jQuery please) how do I work out if a user clicks on the table on which row he/she clicked?