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.
I am using java script for creating table and with javascript itself i generate the id
str += "<td id='R" + i + "C" + j"'>Demo</td>";
Here my code execute when click is triggered
$(this).addClass('active');
var id = $(this).closest('td').attr('id');
document.getElementById('hit').value += id; //hit- id of textarea
is it any way for append the values one by one when user clicks multiple td
i don’t know if i grasped your question clearly but if you want to append to the textarea the value of the td clicked instead of replacing it you can do something like this:
if you want to store the value of the td you can just put an additional :
var value = $(this).text();