学无止境,加油屌丝

js监听多个事件

不注意看到的,保存以备后用

 

['pushState','popstate','replaceState'].forEach(function(item,index){
     window.addEventListener(item, fun);
})

  

posted @ 2020-06-06 22:50  nofeel666  阅读(703)  评论(0编辑  收藏  举报