网站建设福州最好,淘宝客网站必须备案吗,销售推广,怎么做挖矿网站定义和用法 clearInterval() 方法可取消由 setInterval() 设置的 timeout。 clearInterval() 方法的参数必须是由 setInterval() 返回的 ID 值。 语法 clearInterval(id_of_setinterval) 参数描述id_of_setinterval由 setInterval() 返回的 ID 值。 实例 window.οnlοadfunct… 定义和用法 clearInterval() 方法可取消由 setInterval() 设置的 timeout。 clearInterval() 方法的参数必须是由 setInterval() 返回的 ID 值。 语法 clearInterval(id_of_setinterval) 参数描述id_of_setinterval由 setInterval() 返回的 ID 值。 实例 window.οnlοadfunction(){ var aLidocument.getElementsByTagName(li); for(var i0; iaLi.length; i){ aLi[i].οnmοuseοverfunction(){ var oSubNavthis.getElementsByTagName(ul)[0]; if(oSubNav){ var ThisoSubNav;clearInterval(This.time); This.timesetInterval(function(){ This.style.heightThis.offsetHeight16px; if(This.offsetHeight120) clearInterval(This.time); },30) } } //鼠标离开菜单二级菜单动画收缩起来。 aLi[i].οnmοuseοutfunction(){ var oSubNavthis.getElementsByTagName(ul)[0]; if(oSubNav){ var ThisoSubNav;clearInterval(This.time); This.timesetInterval(function(){ This.style.heightThis.offsetHeight-16px; if(This.offsetHeight0) clearInterval(This.time); },30) } } }} 转载于:https://www.cnblogs.com/milkytea/p/6599901.html