i have a simple html table. I want to get the value of first column of a row on which i click.
if i click on first row anywhere it should get value of 1st column of 1st row ,if i click on 2nd row anywhere, it should give value of 1st column of second row..
here is my table:
<table style="border:1px solid black" id="tab">
<tr>
<td style="border-right:1px solid black">Sachin</td>
<td>Yuvraj</td>
</tr>
<tr>
<td style="border-right:1px solid black">Virat</td>
<td>Gautam</td>
</tr>
</table>
1 Answer