CodeBelly.com
CodeBrain.NET

Home
Java Applets
Popup Maker
Top Picks
New Scripts
Java Scripts

Background Color-Change from Link
Back to JavaScript Main Index

Use this script to change the color of the page background from a link.  Shows how to attach to a regular (clicked) link, or how to activate the color change on a mouseOver.  Easy.

.
PART ONE
Installing The Script

Place this script in the <head> of your page.  You can add as many colors as you wish; see the instructions in the script.  Note that the number in brackets [ ] in the backColor[ ] array is the number you will use to call each color from the changeBG(whichColor) function (see Part Two below).

Click here to select the code in the window below.
Use Ctrl+C to copy it to your clipboard.

PART TWO
Setting Up The Links

There are two examples below.  The first shows how to set up a link so that it will change the background color on mouseOver.  The second shows how to set up a link that will change the background color when clicked.

Click here to select the code in the window below.
Use Ctrl+C to copy it to your clipboard.


Home Java Applets JavaScript Index Resources New Scripts
www.CodeBrain.com Need Still More Scripts? www.CodeLifter.com

Copyright 1996 - 2012 by OEC Corp and CodeBelly.com


CodeBrain InterNET
Group
www.CodeBrain.com www.BrainCode.com www.CodeLifter.com www.MicroTicker.com
www.etLux.com www.OECCorp.com www.CodeBelly.com www.CodeFoot.com
www.jsCode.com www.TrayApps.com www.PopUpWorks.com www.Droiddd.com