jQuery 获取 table 行数

 

//获取表的总行数 tr

$("#tableid").find("tr").length ;

//获取所在行的行号

$(this).parent().prevAll().length + 1;//行号

//获取所在列的列号

$(this).prevAll().length + 1;//列

posted @ 2016-02-18 11:02  一个_懒人  阅读(36387)  评论(0编辑  收藏  举报