wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes  tag text bgcolor to change Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark " tag text bgcolor to change" Watch " tag text bgcolor to change" New topic
Author

tag text bgcolor to change

sridevi sangaiah
Greenhorn

Joined: Mar 20, 2001
Posts: 19
Hi !
how can i change the background color of<a href=xyz> anchor text</a> when mouse is over it.
thanks,
sridevi
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
SriDevi,
The following will do the trick. But works in IE only.
regds
maha anna


[This message has been edited by maha anna (edited March 20, 2001).]
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920

"sridevi",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
In IE and Netscape you can do this:
<A HREF="http://my.yahoo.com" OnMouseOver="this.style.color='red'" OnMouseOut="this.style.color='black'">my.yahoo.com</A>
sridevi sangaiah
Greenhorn

Joined: Mar 20, 2001
Posts: 19
Hi !
thanks. it worked.
Originally posted by maha anna:
[B]SriDevi,
The following will do the trick. But works in IE only.
regds
maha anna


[This message has been edited by maha anna (edited March 20, 2001).][/B]

sridevi sangaiah
Greenhorn

Joined: Mar 20, 2001
Posts: 19
Hi !
this way of doing it changes the color of the text and not the background of the text.
thanks,
sridevi
Originally posted by Bodie Minster:
In IE and Netscape you can do this:
<A HREF="http://my.yahoo.com" OnMouseOver="this.style.color='red'" OnMouseOut="this.style.color='black'">my.yahoo.com</A>

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Doh! Sorry, I misread your question.
Ruyard Kipling
Greenhorn

Joined: Apr 26, 2001
Posts: 11
you should check out cascading style sheets, they can do all kinds of nify things, and you dont have to put 30000 <FONT> tags, or bgcolor attributes...

what you want to do is called hovering, i think....
[This message has been edited by Ruyard Kipling (edited April 26, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: tag text bgcolor to change