»
EnglishFrenchVietnamese

Print - Random color onClick - JavaScriptBank.com

Full version: jsB@nk » Background » Random color onClick
URL: http://www.javascriptbank.com/random-color.html

Random color onClick © JavaScriptBank.comThis is a different script to change color of text and background on website.

Full version: jsB@nk » Background » Random color onClick
URL: http://www.javascriptbank.com/random-color.html



JavaScript
<script language="javascript">/*     This script downloaded from www.JavaScriptBank.com     Come to view and download over 2000+ free javascript at www.JavaScriptBank.com*/<!-- Beginfunction rnd(scale) {var dd=new Date();      return((Math.round(Math.abs(Math.sin(dd.getTime()))*1000000000)%scale)); }function show() {       document.blah.bg.value=document.bgColor;        document.blah.fg.value=document.fgColor; }document.fgColor=256*rnd(255)+16*rnd(255)+rnd(255);document.bgColor=256*rnd(255)+16*rnd(255)+rnd(255);// End --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<a href="javascript:history.go(0)">Click here to get new colors</a><FORM name=blah><table border=0 width=50%><tr><td align=left>Foreground color</td><TD align=right>Background color</TD></TR><TR><TD align=left><input type=text name=fg size="20"></TD><TD align=right><input type=text name=bg size="20"></TD></TR></TABLE></FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->