3
Reply

html table to array

Srikanth Reddy

Srikanth Reddy

Jun 19 2015 7:27 AM
467
Hai friends,
I am retrieving the data from html table to an array in jquery.
I had used the following code.
 
$("#crt").live("click", function () {
var arr = [];
$("#tblcomponent tbody tr").each(function (i) {
debugger;
var value = $(this).find("td").text();
arr.push($(this).find("td").text());
});
});
 
I am getting the output of a row as
1hari2500
i need it as           1,hari,2500
 
please help me. 

Answers (3)