By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,573 Members | 3,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,573 IT Pros & Developers. It's quick & easy.

How to change checkbox and radio button color change

P: 1
dear friends

any one can guide me or help, How i can change checkbox and radio button color change with java script

regards
devang
Mar 28 '08 #1
Share this Question
Share on Google+
2 Replies


100+
P: 141
Hi ,
To change color of any element u can use the style property
document.getElementById("controlid").style.backgro undColor = "RED";
to set background color like that u can change any color or any style (like font size ,font name etc)






dear friends

any one can guide me or help, How i can change checkbox and radio button color change with java script

regards
devang
Mar 28 '08 #2

hsriat
Expert 100+
P: 1,654
dear friends

any one can guide me or help, How i can change checkbox and radio button color change with java script

regards
devang
You can't change color of a radio button or checkbox.
IE (and I guess Opera) offers that by using style object (as vee10 said), but that doesn't come under W3C Standard.

So one should write that code which is valid according to W3C standards, unless you have to make it for IE only.

Regards,
Harpreet
Mar 28 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.