How to change color of a button in HTML?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Darrel
Forum Commoner
Posts: 33
Joined: Fri Oct 10, 2014 2:30 am

How to change color of a button in HTML?

Post by Darrel »

How to change color of a button in HTML(if a condition is satisfied) using JAVAscript?

I am developing a webpage using MS Frontpage and wants that the color of the button should change if some condition is satisfied (eg: if X>10 then color should change from red to yellow). And i want this to be done using javascript.
Please help.

<!--[if gte vml 1]><v:rect id="_x0000_s1028"
alt="" style='position:absolute;left:203.25pt;t...
height:18pt;z-index:1;mso-wrap-style:squ...
mso-wrap-distance-top:0;mso-wrap-distanc...
mso-wrap-distance-bottom:0;mso-position-...
mso-position-vertical:absolute;mso-posit...
fillcolor="red">
<v:textbox>
<table cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<td align="center"><span style="font-size: 8pt; font-weight: 700">210</span></td>
</tr>
</table>
</v:textbox>
</v:rect><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position:
absolute;z-index:1;left:270px;top:303p... width=49
height=30 src="index3_files/image001.gif" v:shapes="_x0000_s1028"></span><![endif]...

Please help me with the Javascript that will change the color of this button depending on condition.

Thank You
Post Reply