在读JS高程,在事件一章中有这样一句话, 通过addEventListener()添加的事件处理程序只能使用removeEventListener( )来移除 移除时传入的参数与添加处理程序时使用的参数相同 这也意味着通过addeventListener ( )添加的匿名函数无法被移除。 var btn = document.getElementById("myBtn"); btn.addEventListener("click", function(){ ...