window.onload?=?function(){?//頁面加載完成執行
var?images?=?document.getElementsByTagName('img');//取得所有img圖片
var?pos?=?0;//定義pos變量初始值=0
var?len?=?images.length;//取得圖片個數
setInterval(function(){//定每1秒時執行
images[pos].style.display?=?'none';//第壹個圖片隱藏,
pos?=?++pos?==?len0?:?pos;//pos在圖片個數範圍內遞增
images[pos].style.display?=?'inline';//下壹個圖片顯示
},1000);
};
</script>