版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jiankking/article/details/58598213
$(function(){
$("table td").click(function() {
var row = $(this).parent().index() + 1; // 行位置
var col = $(this).index() + 1; // 列位置
alert("当前位置:第"+row+"行,第"+col+"列")
});
});
点击表格之后显示位置