Groups | Blog | Home
all groups > asp.net > june 2004 >

asp.net : Change cell color when hover


VB Programmer
6/10/2004 11:48:02 PM
How do you change the background/fg color of a cell when the mouse is
hovered above it?

Examples would be nice.

Jos
6/11/2004 12:09:32 PM

[quoted text, click to view]

Your code doesn't work with me. But this works:

<td onmouseover="this.style.backgroundColor='red';"
onmouseout="this.style.backgroundColor='#FFFFFF';" >
test
</td>

Jos

Lau Lei Cheong
6/11/2004 12:28:57 PM
<td onmouserover="self.bgcolor='#000000';"
onmouseout"self.bgcolor='#FFFFFF';"></td>

if you need more than one "state" of color, you probably want to write a
javascript function to handle it.

"VB Programmer" <RobertNZana*NoSpam-Please*@juno.com> ¦b¶l¥ó
news:%23kZrkb2TEHA.972@TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g...
[quoted text, click to view]

VB Programmer
6/11/2004 6:09:42 PM
Thanks. How about the foreground color, font-bold, etc...?

[quoted text, click to view]

AddThis Social Bookmark Button