Topic Areas
Free Scripts
Information
Resources
Tutorials
Information
Search
Help Forums
Contact
Link to Us
Submit Script
Privacy Policy
More Resources
Free Stuff
Web Resources
Other Links
PageResource.com: Learn HTML
Just Free Stuff
JavaScript City
Link Background Color Changer

Script Introduction

This script will allow you to have all of the links on a page change their background color when the mouse moves over them. Only works with IE4+ or NN6+ at this time.

Cut and Paste Code: HEAD Section
This code should be placed between the <head> and </head> tags.

Installation Instructions

  1. Paste the HEAD Section code from above between the <head> and </head> tags on your page.
  2. Find the matching lines below in the script and change the text in red to the text you wish to use:

    a:hover { background-color:lightgreen }

  3. 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 link to go to an example page where the background color of the links changes to light green when the mouse moves over them.

Example Page

JavaScript Book
JavaScript: A Beginner's Guide
by John Pollock
What's New
Simple Searchbox script added.
More...
Web Xpertz
Find more JavaScript tools and resources at WebXpertz City! Click one of the links above to browse the various attractions within the city.