Click here to Skip to main content
15,902,834 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have html table.I want to retrieve all rows and columns value,while i know neither's lengths.

I used

var row_cnt=$('#d_tbl').length;
alert("---"+row_cnt);
var rows=$('#d_tbl').children().get();
now how to get each columns?
Posted

1 solution

try this..

JavaScript
var row_count=$("#table tbody tr").size();
alert("Count :"+row_count);
var cells=$("#table tbody tr td").text(); // this vl contains all the values
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900