Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. var c=0;
  5. var t;
  6. var timer_is_on=0;
  7.  
  8. function timedStop()
  9. {
  10. document.getElementById('bar').width=c;
  11. document.getElementById('bar').height=c;
  12. c=c-16;
  13. t=setTimeout("timedStop()",1);
  14. }
  15.  
  16. function timedCount()
  17. {
  18. document.getElementById('bar').width=c;
  19. document.getElementById('bar').height=c;
  20. c=c+16;
  21. t=setTimeout("timedCount()",1);
  22.  
  23. while (c > 300){
  24. c=300;
  25. setTimeout("timedStop()",5);
  26. return c;
  27. }
  28. }
  29.  
  30. function doTimer()
  31. {
  32. if (!timer_is_on)
  33. {
  34. timer_is_on=1;
  35. timedCount();
  36. }
  37. }
  38. </script>
  39. </head>
  40.  
  41. <body onload="doTimer();">
  42. <img id="bar" src="pisacz.jpg" style="float:center;margin-top:10%;margin-left:20%;>
  43. </body>
  44. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement