js+css 三级竖向导航菜单 问题
效果是上面这个的,代码里面有下面一段不太理解,求大虾解释一下。谢谢if(window.addEventListener)window.addEventListener("...
效果是上面这个的,代码里面有下面一段不太理解,求大虾解释一下。谢谢
if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus) 展开
if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus) 展开
1个回答
展开全部
if (window.addEventListener)如果添加一个监听(键盘、鼠标)为真
window.addEventListener("load", buildsubmenus, false)卸载buildsubmenus
else if (window.attachEvent)如果分离
window.attachEvent("onload", buildsubmenus)加载buildsubmenus
上面是在window上注册个onload时间,处理方法是buildsubmenus
window.addEventListener("load", buildsubmenus, false)卸载buildsubmenus
else if (window.attachEvent)如果分离
window.attachEvent("onload", buildsubmenus)加载buildsubmenus
上面是在window上注册个onload时间,处理方法是buildsubmenus
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询