var start;
var intervalProcess;
window.onload = function () {
if(document.all) {
start = setInterval(‘checkOnLoad()’, 500);
} else {
intervalProcess = setInterval(“checkFlashLoaded()”, 500);
}
}
function checkOnLoad() {
if (document.readyState == “complete”) {
try{
intervalProcess = setInterval(“checkFlashLoaded()”, 500);
clearInterval(start);
}catch(err){return true;}
}
}
function checkFlashLoaded(){
if(document.getElementById(“flash”).PercentLoaded()==100){
你的方法
clearInterval(intervalProcess);
}
}
JS判断flash加载完成
最新推荐文章于 2020-08-12 12:49:16 发布
本文介绍了一种使用JavaScript检测Flash内容是否完全加载的方法。通过设置定时器并利用document.getElementById检查指定ID的Flash元素加载百分比,一旦达到100%,则清除定时器并执行相应操作。
5885

被折叠的 条评论
为什么被折叠?



