復制代碼 代碼如下:
var Imgvalue;
var Count =
var Imgs = new Array(Count);
var ImgLoaded =
//預加載圖片
function preLoadImgs()
{
alert(
for(var i=
Imgs[i]=new Image();
downloadImage(i);
}
}
//加載單個圖片
function downloadImage(i)
{
var imageIndex = i+
Imgs[i]
Imgs[i]
}
//驗證是否成功加載完成
function validateImages(i){
if (!Imgs[plete)
{
window
}
else if (typeof Imgs[i]
{
window
}
else
{
ImgLoaded++
if(ImgLoaded == Count)
{
document
document
alert(
}
}
}
//開始
function RandStart()
{
Init = setInterval(
}
//隨機顯示
function SetRand()
{
imageIndex = Math
document
}
//結束
function RandStop()
{
window
}
From:http://tw.wingwit.com/Article/program/Java/JSP/201404/30610.html