比如同一级有多个li,获得点击的元素的下标,确定第几个。 $("li").click(function(){alert($(this).index());}); 转载于:https://www.cnblogs.com/XUYIYUAN/p/10324171.html