Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var fishstyle;
- function startswimming()
- {
- fishstyle=document.getElement ById("fish").style;
- fishstyle.left=document.body.offsetwidth+ "px";
- window.setInterval("swim()", 75);
- }
- function swim()
- {
- var left= parseInt(fishstyle.left)-5;
- fishstyle.left=left+"px";
- if(left<-118)
- fishstyle.left=document.body.offsetwidth+"px";
- }
- </script>
- <body style="backgroung-image:url(water.jpg)" onload="startswimming()">
- <img scr="fish.gif" alt="fish" id="fish" style="position:absolute;top:70px;" />
Add Comment
Please, Sign In to add comment