当前页面: 开发资料首页 → Javascript 专题 → 贴一例:当所有图片下载完毕时,然后显示网页(有进度)
摘要: 贴一例:当所有图片下载完毕时,然后显示网页(有进度)
随便写的,没仔细检测,实际应用时大家根据需要在完善吧.WIN2003+IE6测试通过
<body style='display:none'>
<table id='' bgcolor='' cellspacing='2' cellpadding='2' border='1' width='100' height='100'>
<tr><td>fdsafd</td><td>fdafd</td></tr><tr><td>fdaf</td><td>fdsadfas</td></tr></table>
;
;
;
<script> //原作 风云舞,date 2003-8-16
//建议运行时,删除脱机图片文件
document.body.style.display='none'
for(i=0;i<100;i++){
document.write ("其他HTML内容")
}
function jiancha(){
for(i=0;i
}
if(i!=document.images.length-1){return false}else{document.title="下载进度:"+document.images.length + "/" +(i+1);return true}
}
time1=setInterval("if(jiancha()){alert('图片下载完成');document.body.style.display='';clearInterval(time1);}",100)
</script>
;
;