Compte à rebours sur refresh sur page HTML
Bonjour,
J'aimerais afficher un compte à rebours sur ma page WEB, qui correspond à mes script de refresh... voici les codes utilisés. Ils fonctionnent le problème n'est pas là... :-)
Code:
1 2 3 4 5 6 7
| <script type="text/javascript">
window.onload=function() {
window.setInterval(function() {
window.frames.Example2.location.reload()
},1000*120)
}
</script> |
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <script type="text/javascript">
window.onload = function() {
var URLs = [
"fiche1.htm",
"fiche2.htm",
"fiche3.htm"
];
var URLsLen = URLs.length;
var ii = 0;
var iframe2 = document.getElementById('Example2');
iframe2.src = URLs[0]; //
window.setInterval(function() {
ii++;
iframe2.src = URLs[ii % URLsLen]; // (% : modulo)
// }, 1000 * 60 * 2); // toutes les 2 minutes
}, 1000 * 15); // toutes les 3 s (EN TEST !)
};
</script> |
Merci d'avance pour votre aide :-)