//获取该class下的li标签 $(“.layui-tab-title li”).click(function () { // li标签下标默认为0 var liindex= $(this).index(); });