html>
Document.banner{
width: 650px;
height: 130px;
position: relative;
}
.btn{
position: absolute;
bottom: 10px;
right: 10px;
}
.btn span{
display: inline-block;
color: red;
width: 20px;
text-align: center;
margin-right: 5px;
border: #FFF solid 2px;
}
window.onload = function(){
var arr = new Array;
arr[0] = "http://pic2.ooopic.com/10/93/86/00b1OOOPIC79.jpg";
arr[1] = "http://pic2.ooopic.com/10/59/05/79b1OOOPICde.jpg";
arr[2] = "http://pic2.ooopic.com/10/58/57/39b1OOOPIC96.jpg";
var cont = 0;
function palys(){
if (arr.length == cont)
cont = 0;
document.getElementById("banner").src = arr[cont];
cont++;
}
var times = setInterval(palys,2000);
function cleartimes(){
clearInterval(times);
}
function show(num){
cleartimes();
var index = parseInt(num);
document.getElementById("banner").src = arr[index - 1];
cont = index;
}
}
1
2
3