1.
//bind .bind(events [,eventData], handler) //on .on(events [,selector] [,data], handler); //如:筛选出ul下的li给其绑定click事件; $('ul').append('<li>js new li<li>');'); $('ul').on('click', 'li', function(){console.log('click');}) //动态添加的li会绑定事件 $('ul li').on('click', function(){console.log('click');}) //动态添加的li不会绑定事件