using javascript display the multiple selected td values
<p>i am using java-script function when i click a td the value is stored in a variable and display in a textarea its works good. but when i click another td value in the textarea changed to new one.</p>

<p>I am using java script for creating table and with javascript itself i generate the id</p>

<pre><code> str += "&lt;td id='R" + i + "C" + j"'&gt;Demo&lt;/td&gt;";
</code></pre>

<p>Here my code execute when click is triggered </p>

<pre><code>      $(this).addClass('active');
      var id = $(this).closest('td').attr('id');
      document.getElementById('hit').value += id; //hit- id of textarea
</code></pre>

<p>is it any way for append the values one by one when user clicks multiple td</p>
