hover colors




JavaScript Source Code 3000: Messages: Hover Colors








































Hover Colors







(Internet Explorer Only) Make the links on your site more exciting by changing the link text and background color when the link is being touched. Each link on your page can have a unique link and background color. Cool!




Put your cursor over each link to see the script in action!

yahoo.com

excite.com





JavaScript Source Code 3000: Messages: Hover Colors
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!





    





<!-- TWO STEPS TO INSTALL HOVER COLORS:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Alan Branch (webman58@aol.com) -->
<!-- Web Site: http://www.technom.com -->

<! >
<! >

<!-- Begin
function doColor(item, color, bg) {
item.style.color = color; // changes text color
item.style.backgroundColor = bg; // changes background
}

function undoColor(item) {
item.style.color = "#000000"; // sets color back to black
item.style.backgroundColor = ""; // sets background to default
}
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<!-- With each link, be sure to use the doColor and -->
<!-- undoColor() functions. In the doColor() part, -->
<!-- link1 is the name you gave to the link initially, -->
<!-- a name="link1" and 'yellow' is the hover text -->
<!-- text color, and 'black' is the hover background. -->

<BODY>

<a name="link1" href="http://www.internet.com/" onmouseover="doColor(link1, 'yellow','black');" onmouseout="undoColor(link1);">internet.com</a>
<p>
<a name="link2" href="http://www.javascriptsource.com/" onmouseover="doColor(link2, 'blue','red');" onmouseout="undoColor(link2);">javascriptsource.com</a>




<!-- Script Size: 1.26 KB -->










Wyszukiwarka

Podobne podstrony:
COLORS
safe colors
option force hex style colors
r colors
colors
Four Colors Gamemasters Guide
colors
alloc colors
2007 08 Common Colors Creating Icc Color Profiles with Argyll Cms
Autumn leaf colors
HOVER Poduszkowce
ColorSelectionModel

więcej podobnych podstron