comme se seront les images le plus longues à charger ...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 <script type='text/javascript'> var Start =new Date() var Stop function LoadingTime(){ var finished=setInterval(function(){ var nbrPics=0; for ( i=0;i<document.images.length;i++){ nbrPics+=(document.images[i].complete)?1:0; } if (nbrPics==document.images.length){clearInterval(finished); Stop=new Date(); alert(Stop-Start) } else {clearInterval(finished); LoadingTime(); return false; } } ,10) } </script> </head> <body onload="LoadingTime()"> </body> </html>
Partager