»
AnglaisFran�aisVietnamien

Imprimer - Butterfly - JavaScriptBank.com

Version compl�te: jsB@nk » Image » Butterfly
URL: https://www.javascriptbank.com/butterfly.html

Butterfly © JavaScriptBank.comCe scipt peut faire une image qui peut se déplacer partout sur le faux site web.

Version compl�te: jsB@nk » Image » Butterfly
URL: https://www.javascriptbank.com/butterfly.html



CSS
<style type="text/css"><!--#mover {position: absolute; left: 5px; top: 5px;}--></style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script type="text/javascript" language="Javascript"><!-- Hide script from older browsersfirstTime = truefunction moveIt() {if (firstTime) {maxHeight = document.body.clientHeight-40maxWidth = document.body.clientWidth-40document.all.mover.style.pixelTop = 5document.all.mover.style.pixelLeft = 5firstTime = false}chgXBy = Math.floor(Math.random() * 10)if ((halfChance() || document.all.mover.style.pixelTop >= maxHeight) && document.all.mover.style.pixelTop > 5) {document.all.mover.style.pixelTop -= chgXBy}else { document.all.mover.style.pixelTop += chgXBy}chgYBy = Math.floor(Math.random() * 10)if ((halfChance() || document.all.mover.style.pixelLeft >= maxWidth) && document.all.mover.style.pixelLeft > 5) {document.all.mover.style.pixelLeft -= chgYBy}else {document.all.mover.style.pixelLeft += chgYBy}setTimeout("moveIt()",20)} function halfChance() {if (Math.random() < .5) {return true}return false}// End hiding script --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<body onload="moveIt()"><img src="butterfly2.gif" width="32" height="32" alt="Butterfly" id="mover"></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/image/butterfly2.gif