2013年3月11日星期一

Javascript-table management1

to alert the text value of each td
Copy code
  1. $('table tr td').each(function(){
  2.       var texto = $(this).text();
  3. });

if you want the value of the first row second column, otherwise known as row 1 cell 2 or position(1,2), 
Copy code
  1. var texto = $('table tr:nth-child(1) td:nth-child(2)').text()

没有评论: