Print Page | Close Window

Changing <TD> bgcolor onmouseover?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=18707
Printed Date: 29 March 2026 at 7:40pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Changing <TD> bgcolor onmouseover?
Posted By: PrivateEye
Subject: Changing <TD> bgcolor onmouseover?
Date Posted: 13 March 2006 at 7:02pm
Can anyone pls tell me how can I change bgcolor of <TD> tag by using onmouseover event? and it should also restore previous color when mouse out. Please write full syntax. thanx


-------------
The Judgement Day



Replies:
Posted By: Scotty32
Date Posted: 14 March 2006 at 11:00am
its not ASP, its Javascripts, but anyway...

<td bgcolor="#C7ECFD" onMouseOver="this.style.background='#95D3EF';" onMouseOut="this.style.background='#C7ECFD';">text</td>

Red = normal colour, when the mouse is off it
Green = Color when the mouse is over the cell


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: Gullanian
Date Posted: 14 March 2006 at 4:16pm
Don't forget you can put it in the TR as well to make the whole row change colour.


Posted By: benbramz
Date Posted: 18 March 2006 at 5:24am
it can also be done with css...this is a good example

http://www.webdesigntutorials.net/tutorials/html_tutorials/html_tutorial_Changing_table_background_on_MouseOver.php - http://www.webdesigntutorials.net/tutorials/html_tutorials/html_tutorial_Changing_table_background_on_MouseOver.php



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net