Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <span id="timer">10</span>
- <script>
- setInterval(function(){TIMER();},1000);
- var s=10;
- function TIMER(){
- if(!s)document.location.href = '/';
- document.getElementById('timer').innerHTML=s;
- s--;
- }
- ///
- $('[data-file]').click(function(elobj){
- var timer=60;
- var intervalID=setInterval(function(){
- if(timer--){
- setFText(timer);
- }else{
- clearInterval(intervalID);//останов
- }
- },100);
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement