<script>
var arr=[
["image/1.jpg","www.baidu.com"],//图片地址 链接地址
["image/3.jpg","www.baidu.com"],
["image/4.jpg","www.baidu.com"],
["image/5.jpg","www.baidu.com"],
["image/6.jpg","www.baidu.com"]
];
var i=0;
function image_()
{
var ima=document.getElementById("image");
ima.src=arr[i][0];
ima.parentNode.href=arr[i][1];
i ;
if(i==arr.length){
i=0;
}
setTimeout("image_()",2000) //2秒钟调用一次
}
</script>
评论