Guest User

Untitled

a guest
Oct 17th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <script type="text/javascript">
  2. var fishstyle;
  3. function startswimming()
  4. {
  5. fishstyle=document.getElement ById("fish").style;
  6. fishstyle.left=document.body.offsetwidth+ "px";
  7. window.setInterval("swim()", 75);
  8. }
  9. function swim()
  10. {
  11. var left= parseInt(fishstyle.left)-5;
  12. fishstyle.left=left+"px";
  13. if(left<-118)
  14. fishstyle.left=document.body.offsetwidth+"px";
  15. }
  16. </script>
  17.  
  18. <body style="backgroung-image:url(water.jpg)" onload="startswimming()">
  19. <img scr="fish.gif" alt="fish" id="fish" style="position:absolute;top:70px;" />
Add Comment
Please, Sign In to add comment