$('ul li').click(function(){ $(this).addClass('active').siblings().removeClass('active'); }) 转载于:https://www.cnblogs.com/shaoing/p/11427870.html