timer
This commit is contained in:
parent
aa089cb904
commit
c4777017dc
@ -35,7 +35,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
var redirectTimer;
|
var redirectTimer;
|
||||||
|
var chiffre;
|
||||||
|
|
||||||
imgRef.innerHTML = ' ';
|
imgRef.innerHTML = ' ';
|
||||||
|
|
||||||
@ -51,13 +51,15 @@
|
|||||||
|
|
||||||
function startCounter(event) {
|
function startCounter(event) {
|
||||||
absorbEvent_(event);
|
absorbEvent_(event);
|
||||||
imgRef.innerHTML = 3;
|
chiffre = 3;
|
||||||
|
imgRef.innerHTML = "Redirection "+chiffre;
|
||||||
redirectTimer = setInterval(counter, 1000);
|
redirectTimer = setInterval(counter, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function counter() {
|
function counter() {
|
||||||
imgRef.innerHTML--;
|
chiffre--;
|
||||||
if(imgRef.innerHTML == 0) location.href="{{URL::to('choisirref')}}";
|
imgRef.innerHTML = "Redirection "+chiffre;
|
||||||
|
if(chiffre == 0) location.href="{{URL::to('choisirref')}}";
|
||||||
}
|
}
|
||||||
|
|
||||||
function endCounter(event) {
|
function endCounter(event) {
|
||||||
|
Reference in New Issue
Block a user