How to get an HTML table rows count when it contains tbody on HTML layout?

 Posted by vishalneeraj-24503 on 12/2/2014 | Category: JavaScript Interview questions | Views: 1690 | Points: 40

We can write below code:-
var table_rows_cnt = document.getElementById('your_table_id').getElementsByTagName('tbody')[0].getElementsByTagName('tr').length;


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response