程序代碼 :


<SCRIPT LANGUAGE="JavaScript">
// 設置輪番顯示速度 Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2000;
// 勻滑轉換時間 Duration of crossfade (seconds)
var crossFadeDuration = 3;
// 指定圖像文件 Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = '圖片路徑'
Pic[1] = '圖片路徑' <- 圖片多的話繼續加注意PIC後面的[]裡面的數值->

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad = new Image();
preLoad.src = Pic;
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
</script>
arrow
arrow
    全站熱搜

    kevin0523 發表在 痞客邦 留言(0) 人氣()