第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

為什么setInterval會(huì)報(bào)錯(cuò)is not defined?

為什么setInterval會(huì)報(bào)錯(cuò)is not defined?

kolog 2017-08-10 15:57:11
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>#</title><style type="text/css">.cl{content: "";display: block;clear: both;zoom:1;}.box{background: #cff;width: 300px;height: 200px;position: absolute;top: 50%;left: 50%;margin-left: -150px;margin-top: -100px;}.box>div{float: left;}.box .left,.box .right{width: 50px;height: 200px;}.box .left li,.box .right li{width: 50px;height: 49px;line-height: 49px;text-align: center;cursor: pointer; border-bottom: 1px solid #ccc;list-style: none;}.box .active{background: #ccf;}.box .img{width: 200px;height: 200px;background: #ccc;}</style></head><body><div class="box cl"><div><li>1</li><li>2</li><li>3</li><li style='height: 50px;border: none;'>4</li></div><div></div><div><li>5</li><li>6</li><li>7</li><li style='height: 50px;border: none;'>8</li></div></div><script type="text/javascript">var aDiv=document.getElementsByClassName('box');var arr=['#f00','#0f0','#00f'];function Tab(aDiv){var aDiv1=aDiv.getElementsByTagName('div');var aLi=aDiv.getElementsByTagName('li');for(var i=0;i<aLi.length;i++){aLi[i].index=i;aLi[i].onmouseover=function(){num=this.index;clearInterval(timer);}aLi[i].onmouseout=function(){timer=setInterVal(function(){if(num==aLi.length){num=0;}else{num++;aLi[num-1].className='';aLi[num].className='active';aDiv1[1].style.background=arr[i%arr.length];}},1000);}}var num=0;var timer=setInterVal(function(){if(num==aLi.length){num=0;}else{num++;for(var i=0;i<aLi.length;i++){aLi[i].className='';}aLi[num].className='active';aDiv1[1].style.background=arr[i%arr.length];}},1000);}for(var i=0;i<aDiv.length;i++){Tab(aDiv[i]);}</script></body></html>
查看完整描述

1 回答

?
一諾yinol

TA貢獻(xiàn)27條經(jīng)驗(yàn) 獲得超4個(gè)贊

setInterVal沒(méi)有定義!

查看完整回答
反對(duì) 回復(fù) 2017-08-10
  • 1 回答
  • 0 關(guān)注
  • 5629 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)