Many times we need to set the fore color or back color of controls (e.g. label, button etc).
This can be achieved using CSS (supposing all of you know that) also but we can also do it using Java Script.
This is a simple java script trick so you can use it with html controls as well as asp.net server controls.
Here is an example for doing this :
<a href=”contact.aspx” class=”mainMenuNormalStyle” onmouseover=”style.color=’#FFB537′;”
<a href=”contact.aspx” class=”mainMenuNormalStyle” onmouseover=”style.backgroundcolor=’#FFB537′;”
In the above code example i set the value of style collection’s color property on the “onmouseover” event and reversed on “onmouseout” event.