Change background color of webpage by mouse over the color

Nishant24's Avatar, Join Date: Apr 2013
Light Poster
Hey, guys.,, I am in 12th class and I was a given a question in my computer practical exam to write a script in javascript that changes background color of the webpage when mouse cursor is over the link of the particular color.
For eg. We created a link naming red and when we put our mouse cursor over that link, the background color changes to red instead of white.
And further I was asked that if we move the cursor from that link the background color should again change to white from red.
Help me friends.... the first scritp I wrote but after moving the cursor from that link it still remains red only, I mean the background of the webpage.

Help guys..
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Show us some efforts on what you have tried.