$('#sidebar').on('click','.submenu>li>a',function(){ alert($(this).attr('id')); }) 转载于:https://www.cnblogs.com/shuaitong/p/7462152.html