加在< head>中
< script language=”javascript”>
//more javascript from http://www.smallrain.net
// set slideshowspeed (milliseconds)
var slideshowspeed = 5000;
// 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] = jsimg/1.jpg
pic[1] = jsimg/2.jpg
pic[2] = jsimg/3.jpg
pic[3] = jsimg/4.jpg
pic[4] = jsimg/5.jpg
pic[5] = jsimg/6.jpg
pic[6] = jsimg/7.jpg
pic[7] = jsimg/8.jpg
pic[8] = jsimg/9.jpg
pic[9] = jsimg/10.jpg
// 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[i] = new image();
preload[i].src = pic[i];
}
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>
加在< body>中
< table border=”0″ cellpadding=”0″ cellspacing=”0″>
< tr>
< td id=”vu”>
< img src=”jsimg/1.jpg” name=slideshow width=388 height=415>
< /td>
< /tr>
< /table>