js document.addEventListener 注册事件,

 document.addEventListener  = function(evt,handler,capture){

}

这个是js 事件注册,网页一加载的时候,就会被执行。是js内置了的,网页一加载就会被执行的!跟普通的方法不一样。

原文地址:https://www.cnblogs.com/shenbin/p/2957409.html