function setRowData (obj) { var .. len = $ (obj) .parent () parent () Find ( "INPUT" ) .length; // parent object that is located td, row i.e. the parent tr, and where to look All input block row var for inputValue = $ (obj) .val (); for ( var I = 0; I <len; I ++ ) { $(obj).parent().parent().find("input")[i].value=inputValue; } }
<tr align="center">
<td class="table_none">
<input id="input01" class="text_input50" value="0" type="text" ondblclick="setRowData(this);">
</td>
<td class="table_none">
<input id="input01" class="text_input50" value="0" type="text" ondblclick="setRowData(this);">
</td>
<td class="table_none">
<input id="input01" class="text_input50" value="0" type="text" ondblclick="setRowData(this);">
</td>
</tr>