Full version: jsB@nk » Background » Flashing background with button
URL: https://www.javascriptbank.com/background-warping.html
This JavaScript code will change the background from one color to the next for each of the different colors then it starts the loop over again! There is also an On/Off button to let you start and stop the JavaScript.
Full version: jsB@nk » Background » Flashing background with button
URL: https://www.javascriptbank.com/background-warping.html
<script language="javascript">/* This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com*/<!-- Beginvar COLOR = 999999var woot = 0function stoploop() {document.bgColor = '#000000';clearTimeout(loopID);}function loopBackground() {if (COLOR > 0) {document.bgColor = '#' + COLORCOLOR -= 111111loopID = setTimeout("loopBackground()",1)} else {document.bgColor = '#000000'woot += 10COLOR = 999999COLOR -= wootloopID = setTimeout("loopBackground()",1) }}// End --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<FORM NAME="background"><INPUT TYPE="button" VALUE="Start bgColor WARP"onClick="loopBackground()"><br><input type="button" value="Stop bgColor WARP" onClick="stoploop()"></FORM><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->