如何随意轮换图像,而不必用固定时间更新网页?
j)
var bannerImages = new Array( );
bannerImages[0] = "Banner1.jpg";
bannerImages[1] = "Banner2.jpg";
bannerImages[2] = "Banner3.jpg";
bannerImages[3] = "Banner4.jpg";
var randomImageIndex = Math.round( Math.random( ) * 3 );
document.write( "<img alt="" src="imgs/" + bannerImages[randomImageIndex] + "">" );
`