var titles = document.getElementsByTagName('p'); var arr = document.getElementsByTagName('ul') for(var i = 0;i<titles.length;i++){titles[i].id = i;titles[i].onclick=function(){for (var k= 0; k < titles.length; k++) {arr[k].id = k;arr[arr[k].id].className = '';}arr[this.id].className = 'active';} }
// 計時開始
timer = setInterval(countDown,1000);
function countDown(){
send.value = `${times}秒后重試`;
if(times>=0){
times -= 1;
send.disabled = true;
}else{
send.value = "發送驗證碼";
send.disabled = false;
clearInterval(timer);
}
}
timer = setInterval(countDown,1000);
function countDown(){
send.value = `${times}秒后重試`;
if(times>=0){
times -= 1;
send.disabled = true;
}else{
send.value = "發送驗證碼";
send.disabled = false;
clearInterval(timer);
}
}
<div id="bottom_column">
<divclass="content_notice" style="display:block">
<div>
<div>
? <a href="#" class="notice1">顛覆式創新</a>
<a href="#" class="notice2">旗艦來了</a>
</div>
</div>
</div>
</div>
就像這樣 外邊嵌套多層div 應該怎么取
<divclass="content_notice" style="display:block">
<div>
<div>
? <a href="#" class="notice1">顛覆式創新</a>
<a href="#" class="notice2">旗艦來了</a>
</div>
</div>
</div>
</div>
就像這樣 外邊嵌套多層div 應該怎么取
//這里用onmouseout的話,鼠標離開序號后就開始切換圖片了
wrap.onmouseleave=function() {
if(timer) {
clearInterval(timer);
timer=null;
}
timer=setInterval(Autoplay,2000);
wrap.onmouseleave=function() {
if(timer) {
clearInterval(timer);
timer=null;
}
timer=setInterval(Autoplay,2000);
2019-03-27