jquery如何获取取元素序号,例如一个有N行的table,点击其中的一行,获取到它的行号。

2025-05-06 16:00:57
推荐回答(1个)
回答(1):

$("tr").click(function(){
alert($(this).index());
});
试试