1 reply [Last post]
Joshshift
Offline
newbie
Last seen: 16 years 20 weeks ago
Joined: 2004-07-12
Posts: 1
Points: 0

i have a link like this:

<a href=www.yahoo.com OnMouseOver="font.color=red">click here</a>

as you can see im trying to change the color of the font on mouseover and i have tried many variations to no avail. im not a jscripter, im a vbscripter, can i please get some help on this simple question?

Thank you

Josh

Tags:
_janim
Offline
Regular
phinland
Last seen: 16 years 25 weeks ago
phinland
Joined: 2004-06-08
Posts: 22
Points: 0

onmouseover javascript question

Use css, it's easier.

<style type="text/css">
a:hover {
   color: red;
}
</style>

If, for some very odd reason, you'd have to use javascript:

<a href="page.html" onmouseover="this.style.color='red'">click here</a>

Please Provide a link to your code/site. If you can't, then please at least provide the HTML & CSS together.