单击时如何更改单选按钮的颜色。 [英] How to change the color of radio button when clicked.

查看:81
本文介绍了单击时如何更改单选按钮的颜色。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我的asp.net网页上有一个单选按钮列表。用户可以从单选按钮上的选项列表中选择。



所以,当我选择特定选项时,单选按钮内的点应该变为红色。 br />


请帮忙。





谢谢。

Dear Friends,

I have a radio buttonlist on my asp.net webpage. user can select from the list on options from the radio button.

so, when i select particular option, the dot inside the radio button should change to RED color.

Please help.


Thanks.

推荐答案

你好专业人士



搜索许多你的解决方案,最后得到你需要为单选按钮做自定义绘图..



有一些重要的链接可以帮助你........



< a href =http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/35639a99-b2b2-4fe9-955d-775cb88ead43/> http://social.msdn.microsoft.com/论坛/ en-US / wpf / thread / 35639a99-b2b2-4fe9-955d-775cb88ead43 / [ ^ ]



http://stackoverflow.com/questions/6459381/change-the-color-of-a-small -circle-dot-contained-the-the-radio-button-to- [ ^ ]



http://social.msdn。 microsoft.com/Forums/sv-FI/csharpgeneral/thread/2cd610ba-8104-42e5-914d-bfcdc0479178 [ ^ ]



happy帮助朋友
hello professional

search many for your solution and finally got that You need to do custom drawing for the radio button ..

there is some important link that may help you........

http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/35639a99-b2b2-4fe9-955d-775cb88ead43/[^]

http://stackoverflow.com/questions/6459381/change-the-color-of-a-small-circle-dot-contained-within-the-radio-button-to-be[^]

http://social.msdn.microsoft.com/Forums/sv-FI/csharpgeneral/thread/2cd610ba-8104-42e5-914d-bfcdc0479178[^]

happy to help friend


您好,

您可以查看以下链接:



http://stackoverflow.com/questions/4253920/how-do-i-change-the-color-of-radio-buttons [ ^ ]



你必须执行一些javascript技巧n东西..



希望它有帮助..

< br $>
问候

anurag
Hi,
You might wana check the below link:

http://stackoverflow.com/questions/4253920/how-do-i-change-the-color-of-radio-buttons[^]

you will have to perform some javascript tricks n stuffs..

hope it helps..

regards
anurag


Html

Html
<input type="radio" name="rbtn" id="RadioGroup1" value="radio2" onclick="ChangeColor();">
    <span id="rad2">Radio2</span></input>




function ChangeColor() {
            var lableText = document.getElementById('rad2');
            lableText.style.color = "red";
        }





你可以达到这样的目标。



you can achieve your target like this.


这篇关于单击时如何更改单选按钮的颜色。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆