JS给同一元素同一事件添加多个响应函数,而不会覆盖现有事件:addEventListener(IE8及以下需要考虑兼容性问题)
element.addEventListener("click", myFunction); element.addEventListener("click", mySecondFunction); element.addEventListener("mouseover", myFunction); element.addEventListener("mouseout", myThirdFunction);