|
Script Introduction
This script will allow your viewers to change the background color of your page when they move
the mouse over a link.
Cut and Paste Code: BODY Section
This code should be placed between the <body> and </body> tags.
Installation Instructions
-
Paste the BODY Section code from above between the <body> and </body> tags on your page,
exactly where you want the links to appear.
-
Find the matching lines below in the script and change the text in red to
the text you wish to use:
my_color[0]="lime";
my_color[1]="orange";
my_color[2]="lightblue";
my_color[3]="pink";
my_color[4]="white";
<a href="#" onmouseover="javascript:get_color(0)">Lime</a>
<a href="#" onmouseover="javascript:get_color(1)">Orange</a>
<a href="#" onmouseover="javascript:get_color(2)">Light Blue</a>
<a href="#" onmouseover="javascript:get_color(3)">Pink</a>
<a href="#" onmouseover="javascript:get_color(4)">Back</a>
-
Check the Format Window
to be sure you do not have one single line of code, or too many line breaks in the code.
Example
A working sample of the script is shown below.
Click the links to test the script.
Change the background color!
|