title: Get text from td and print it in a input
body: <p>I've a table and I need to get the text of the td I've clicked and print it in a input box.
  Now I've this code but it prints the last value of the table.</p>
  
  <pre><code>$("td").click(function(){  
      $("td").each(function(index){
          $("#prueba").val(($(this).text())); 
      }); 
  }); 
  </code></pre>