Javascripts > Misc Javascripts > Super-Duper Virtual Disco Ball
Script Title: Super-Duper Virtual Disco Ball
Description: A fun, cute script that changes the background of your website to each and every color in the rainbow (almost!☺), plus white, all in a neat box. Looks SUPERCOOL! But don't take my word for it! Try it yourself!
Example: No example available for this script.
Credit: Script created by The Javascript Donor
Copy the following code into the BODY of your html page.<script type="text/javascript"> <!-- function get_color(color_num) { var now_color=color_num; var my_color= new Array(5) my_color[0]="red"; my_color[1]="orange"; my_color[2]="yellow"; my_color[3]="green"; my_color[4]="blue"; my_color[5]="purple"; my_color[6]="white"; my_color[7]="purple"; document.bgColor=my_color[now_color]; } //--> </script> <div style="width: 80%; height: 298; border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" align="center"> <p align="center"><b><font face="ARIAL" size="3">Super-Duper Virtual Disco Ball</font></b></p> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#808080" width="111" height="97" id="AutoNumber1"> <tr> <td width="111" height="14" bgcolor="#FF0000" align="center"> <p align="center"> <input type="button" value="Red" onclick="get_color(0)"></td> </tr> <tr> <td width="111" height="14" bgcolor="#FF6600" align="center"> <p align="center"> <input type="button" value="Orange" onclick="get_color(1)"></td> </tr> <tr> <td width="111" height="14" bgcolor="#FFFF00" align="center"> <p align="center"> <input type="button" value="Yellow" onclick="get_color(2)"></td> </tr> <tr> <td width="111" height="14" bgcolor="#008000" align="center"> <p align="center"> <input type="button" value="Green" onclick="get_color(3)"></td> </tr> <tr> <td width="111" height="14" bgcolor="#0000FF" align="center"> <p align="center"> <input type="button" value="Blue" onclick="get_color(4)"></td> </tr> <tr> <td width="111" height="14" bgcolor="#800080" align="center"> <p align="center"> <input type="button" value="Purple" onclick="get_color(7)"></td> </tr> <tr> <td width="111" height="13" bgcolor="#FFFFFF" align="center"> <p align="center"> <input type="button" value="White" onclick="get_color(6)"></td> </tr> </table> <p align="center"><br /> </p> </div>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email