Click to See Complete Forum and Search --> : TD bgcolor
Jonathan
08-22-2003, 10:28 AM
How can I do a bgcolor for a td on a mouseover?
<td align=left style="background-color:gray;" onmouseover="style.backgroundColor='blue'">
Is that right?
DOSPrompt
08-22-2003, 10:34 AM
I think you'd need a "this" in there, so that the script knows which element you're talking about...
<td align=left style="background-color:gray;" onmouseover="this.style.backgroundColor='blue'">
Andrew
Jonathan
08-22-2003, 10:40 AM
okay, but it worked for me... why is that
?
AdamBrill
08-22-2003, 11:43 AM
It automatically references the element, so "this" is not needed, it will work either way. Jonathan, since you already had it working, did you have a question??
Jonathan
08-22-2003, 01:32 PM
Nope, that about covers it...