Home

Javascript

Bottom




< d e v h e a d : s c r i p t l i b r a r y >

Script: 0060
Type: JavaScript
------------------------------------------------

To install this script, follow this simple step:

1. Cut and paste this into the BODY of your document:

<SCRIPT>
<!--//BEGIN Script
function cols(c1, c2, c3, c4, c5, c6, c7){
this.c1 = c1;
this.c2 = c2;
this.c3 = c3;
this.c4 = c4;
this.c5 = c5;
this.c6 = c6;
this.c7 = c7; }

rainbow = new cols("red", "orange", "yellow", "green", "blue", "indigo", "violet");

fade = new cols("white", "DDDDDD", "BBBBBB", "999999", "777777", "555555", "333333", "black");

greens = new cols("darkgreen" , "forestgreen", "green", "lawngreen", "lightgreen", "limegreen", "palegreen");

sunset = new cols("skyblue", "slateblue", "violet", "darkorange", "red", "darkred", "black");

psyc = new cols("violet", "lawngreen", "violet", "lawngreen", "violet", "lawngreen", "violet");

function cycle(type) {
scheme = type;
document.bgColor = scheme.c1;
timerID=setTimeout('document.bgColor = scheme.c2', document.selector.interval.value * 10);
timerID=setTimeout('document.bgColor = scheme.c3', document.selector.interval.value * 20);
timerID=setTimeout('document.bgColor = scheme.c4', document.selector.interval.value * 30);
timerID=setTimeout('document.bgColor = scheme.c5', document.selector.interval.value * 40);
timerID=setTimeout('document.bgColor = scheme.c6', document.selector.interval.value * 50);
timerID=setTimeout('document.bgColor = scheme.c7', document.selector.interval.value * 60); }
//-->
</SCRIPT>

<FORM NAME="selector">

Choose a colour scheme: <BR>
<INPUT TYPE="button" VALUE="Rainbow" onClick="cycle(rainbow)">
<INPUT TYPE="button" VALUE="Fade To Black" onClick="cycle(fade)">
<INPUT TYPE="button" VALUE="Greens" onClick="cycle(greens)">
<INPUT TYPE="button" VALUE="Sunset" onClick="cycle(sunset)">
<INPUT TYPE="button" VALUE="Psychedelic" onClick="cycle(psyc)"><P>

Set colour change interval (1/10ths of a second): <BR>
<INPUT TYPE="text" SIZE="8" NAME="interval" VALUE="50">

</FORM>
------------------------------------------------
ZDNet (c) 1999. DevHead and ScriptLibrary provides
these scripts as a free service to our users. The
scripts have been provided by the author for use
within the resource and are "freely distributable."
Scripts remain the property of the author, unless
otherwise indicated.






Choose a colour scheme:

Set colour change interval (1/10ths of a second):






< d e v h e a d : s c r i p t l i b r a r y >

Script: 0077
Type: JavaScript
------------------------------------------------

To install this script, follow these simple steps:

1. Cut and paste this script into the HEAD of your document:

<SCRIPT language="JavaScript">
<!--BEGIN Script

function clrred() {
document.bgColor="C80C20";}

function clrblue() {
document.bgColor="5050C8";}

function clrgreen() {
document.bgColor="28B020";}

function clryellow() {
document.bgColor="FFFF80";}

//-->

</SCRIPT>

2. Cut and paste this into the BODY of your document:

<B>Please pick your colour:</B>
<P>
<A HREF="#test" onMouseOver="clrred()" onClick="alert('Pick does not mean Click')">
<FONT COLOR="Black">Red</FONT></A> |
 <A HREF="#test" onMouseOver="clrblue()" onClick="alert('Pick does not mean Click')">
<FONT COLOR="Black">Blue</FONT></A> |
<A HREF="#test" onMouseOver="clrgreen()" onClick="alert('Pick does not mean Click')">
<FONT COLOR="Black">Green</FONT></A> |
 <A HREF="#test" onMouseOver="clryellow()" onClick="alert('Pick does not mean Click')">
<FONT COLOR="Black">Yellow</FONT></A><br>

------------------------------------------------
ZDNet (c) 1999. DevHead and ScriptLibrary provides
these scripts as a free service to our users. The
scripts have been provided by the author for use
within the resource and are "freely distributable."
Scripts remain the property of the author, unless
otherwise indicated.











Please pick your colour:

Red | Blue | Green | Yellow








Home

Top





Hosted by www.Geocities.ws

1