Js现代事件处理方式中,怎么针对老版本的浏览器做兼容性处理?
城堡下的诡洞
城堡下的诡洞 2016-12-20 15:10:44
0
2
1081
城堡下的诡洞
城堡下的诡洞

reply all(2)
数据分析师

In the modern event processing method of JS, how to deal with compatibility for older versions of browsers? -PHP Chinese website Q&A-In the modern event processing method of JS, how to deal with compatibility for old versions of browsers? -PHP Chinese website Q&A

Please watch and learn.

迷茫

If(document.addEventListener){

[object].addEventListener(“事件名称”,函数名,true/false)     //DOM

}else if(document.attachEvent){

[object].aattachEvent(“事件名称”,函数名,true/false)     //   IE

}


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!