如何更改复选框的背景颜色选中复选框。 [英] how to change checkbox's background color whene checkbox is checked.
本文介绍了如何更改复选框的背景颜色选中复选框。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
for(int i = 0; i< list.Count;)
{htmlStr + =
< input type ='复选框'Id =+ list [i] +name =''value =''>+ lststr [i] + | < input type ='checkbox'Id =+ list [ i + 1] +> + lststr [i + 1] + | ; i = i + 10;} 返回htmlStr; 这是我的代码, 我的要求是当用户点击这些复选框时,这些复选框的背景颜色会改变..... plz help ... |
解决方案
你想改变一个颜色吗?选中复选框或想要更改复选框本身的颜色时的特定区域?
我理解的是,您需要类似......的内容,如下面的链接所示:< br $> b $ b
http://jsfiddle.net/B7P65/1/ [ ^ ]
我认为以下链接符合您的要求。请访问它。
h ttp://jsfiddle.net/sXZuW/ [ ^ ]
for (int i = 0; i < list.Count; )
{ htmlStr += "
<input type='checkbox' Id=" + list[i] + " name=' ' value=' '> " + lststr[i] + " | <input type='checkbox' Id=" + list[i + 1] + ">" + lststr[i + 1] + " | ; i = i + 10; } return htmlStr; this is my code, My requirement is whene user click on from these checkboxes the background color of these checkbox is changed..... plz help... |
解决方案
Do you want to change the color of a particular area when checkbox is checked or you want to change the color of checkbox itself?
What I understood, you want something like… as shown in the below link:
http://jsfiddle.net/B7P65/1/[^]
I think below link is matching with your requirement. Please visit it.
http://jsfiddle.net/sXZuW/[^]
这篇关于如何更改复选框的背景颜色选中复选框。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文