Question: I have a table:

```
<table>
<thead>
    <tr>
        <td>some1</td>
          ......
        <td>some2</td>
        <th>count</th>
        <th>EditCount</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>some1</td>
          ......
        <td>some2</td>
        <td>25</td>
        <td><input type='text' value='1'/></td>
   </tr>
   <tr>
        <td>some1</td>
          ......
        <td>some2</td>
        <td>35</td>
        <td><input type='text' value='3'/></td>
   </tr>

```

How to get td value in left side from input in each row, for example when user clicked on this input?

Answer: 
(Note from "left side" i took this to mean the first `td` ie the leftmost one)

Try this :

```
$('input[type=text]' ).change(function() {
  var firsttd = $('td:first', $(this).parents('tr'));
});

```

Uses the [.change()](http://api.jquery.com/change/) method in jQuery (this could be `focus` or `blur` etc). Uses the selector `td:first` to get the first `td` and sets the context to the current objects (`input') parent`tr`

[Working example here](http://jsfiddle.net/3tkyW/)

Update
------

To get the previous `td` (ie with values `25` or `35` use :

```
$('input[type=text]' ).change(function() {
  var prevtd = $(this).parent('td').prev('td');
});

```

This gets the [.parent()](http://api.jquery.com/parent/) `td` and then the [.prev()](http://api.jquery.com/prev/) `td`

[Working example here](http://jsfiddle.net/3tkyW/1/)
Are you comfortable using jQuery? If so, then you can use the prev() function in jQuery to do get the immediately preceding sibling (the previous td in this case)

Read this : <http://api.jquery.com/prev/>