Hadi1989

Untitled

Oct 1st, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     function run(){
  3.         var elem = document.getElementById("bar");
  4.         var count = document.getElementById("count");
  5.         var width = 1;
  6.         var id = setInterval(frame,25);
  7.     function frame(){
  8.         if (width >= 100) {
  9.             clearInterval(id);
  10.         }else{
  11.             width++;
  12.             elem.style.width = width + '%';
  13.             count.innerHTML = width + '%';
  14.         }
  15.        
  16.      }
  17.     }
  18.  
  19. </script>
Advertisement
Add Comment
Please, Sign In to add comment