 <p>If you want the text of each cell to be captured as a singe space-separated string to populate your input, you can do this:</p> <pre><code>$(document).ready(function() { $('#table tr').click(function() { var $test = $(this).find('td').map(function() { return $(this).text(); }).get().join(" "); $('#input').val($test); }); }); </code></pre> <p>EDIT just call <a href="http://api.jquery.com/text/" rel="nofollow noreferrer"><code>text()</code></a>, e.g.:</p> <pre><code>var $field1 = $(this).find('td.field1').text(); </code></pre>