获取table的列和行位置.cellIndex和.rowIndex

$('table').mousedown(function(e){
     celindex = $(e.target)[0].cellIndex;
     rowindex = $(e.target).parent()[0].rowIndex;
});

.cellIndex对象是<td>.

.rowIndex对象是<tr>. 

posted on 2014-11-12 17:59  YeWeb  阅读(2034)  评论(0编辑  收藏  举报

导航