Advertisement
Guest User

Untitled

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