Load | show JavaScript allows picture load progress to be displayed in real time
Function chk () {
l--;
document.getElementById ("AA"). innertext= "" + ((sum-l) *100/sum) + "%"
if (l==0) {
for (var i=0;i<sum;i++)
document.body.innerhtml+= " '
}
if (document.images) {
Imgs[0]=new image ()
Imgs[1]=new image ()
Imgs[2]=new image ()
Imgs[3]=new image ()
Imgs[4]=new image ()
Imgs[5]=new image ()
Imgs[6]=new image ()
Imgs[7]=new Image ()
imgs[0].src= ... /.. /"/articleimg/2006/08/3859/01.jpg";
imgs[1].src= ... /.. /"/articleimg/2006/08/3859/02.jpg";
imgs[2].src= ... /.. /"/articleimg/2006/08/3859/03.jpg";
imgs[3].src= ... /.. /"/articleimg/2006/08/3859/04.jpg";
imgs[4].src= ... /.. /"/articleimg/2006/08/3859/05.jpg";
imgs[5].src= ... /.. /"/articleimg/2006/08/3859/06.jpg";
imgs[6].src= ... /.. /"/articleimg/2006/08/3859/07.jpg";
imgs[7].src= ... /.. /"/articleimg/2006/08/3859/08.jpg";
}
</script>
<body>
<div id= "AA" >0%</div>
<script>
Sum=l=imgs.length;
for (Var i=0;i<l;i++) {
Imgs[i].onload=chk;
imgs[i].onerror=chk;//executes the specified method regardless of whether the picture was successfully loaded
}
</script>
</body>