如何让轮播图可以上下切换图片

function one (type){
document.getElementById("a").innerHTML =''
}
var d = 5;
function two (type){
document.getElementById("a").innerHTML = '';
if(type=='shang'){
d--;
if(d==0){d=5;}
}else if(type == 'xia'){
d++;
if(d==6){d=1;}
}
}


window.onload = function(){
setInterval(
function(){
document.getElementById("a").innerHTML = '';
d++;
if(d==6){d=1;}
},
4000
)
}

转载于:https://www.cnblogs.com/gaowc/p/10701035.html

你可能感兴趣的:(如何让轮播图可以上下切换图片)