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