I have table this :
<table border="1" id="table">
<tr>
<th>Id</th>
<th>action</th>
</tr>
<tr>
<td>123</td>
<td><a href="#">select</a></td>
</tr>
<tr>
<td>456</td>
<td><a href="#">select</a></td>
</tr>
<tr>
<td>789</td>
<td><a href="#">select</a></td>
</tr>
</table>
result =<input type="text">
using javascript how to show id value on input when click selected href rows, thanks
Using jQuery, you can do it like this:
Working demo.
JS:
HTML: