根据单选按钮的检查状态设置不同的图片 [英] set different pictures according to radio button checked status
本文介绍了根据单选按钮的检查状态设置不同的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想根据单选按钮的检查状态设置不同的图片,但我不想通过编程方式进行.
我想以某种方式使用css或theme.
我想设计一个在线测试,并且在数据列表中使用了4个单选按钮.
我希望当用户选择一个单选按钮时,它的图片会自动更改.
如果您经验不足,请参阅此
Hi,
I want to set different pictures according to radio button checked status but I don''t want to do this programmatically.
I want use somehow like css or theme.
I want to design an online test and I used 4 radio buttons inside a datalist.
I want that when a user selects one of the radiobuttons the picture of it changes automatically.
Please see this
推荐答案
javascript我现在就开始研究它
JavaScript教程
if you have little experience of javascript I would start looking into it now before taking this
Javascript tutorials
我怀疑是否有直接的方法.不过,您可以从现有控件中创建自定义控件-在其中为Radiobutton的选定项设置不同的kinda样式/css.
尽管具有现有控件,但是您可以使用 JavaScript [
I doubt there is a direct way to do it. You can create your custom control from existing one though - in it set a different kinda style/css for selected items of Radiobutton.
Though with existing control, you can use JavaScript [^]to do the changing/highlighting.
Looks like, existing site link that you have shared across also uses Javascript.
这篇关于根据单选按钮的检查状态设置不同的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文