需要在运行时更改复选框的颜色。 [英] need to change the color of checkbox at runtime.

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

问题描述

先生,我有一个gridview,其中有2列。 (1) - 当然,(2)-Sem。两者都是在gridview中使用复选框显示。

我需要在我选择特定课程时,sem复选框的颜色会发生变化。我该怎么办。

解决方案

使用jQuery:



 


#your_grid_id)。on( 点击 input [type = checkbox] function (){
if this .checked)


this ).css( backgroud-color green);
else


sir, i have a gridview in which 2 columns are there. (1)- course,(2)-Sem . both are show using checkbox in gridview.
i need that when i select a particular course then the color of sem checkbox are change. how can i do it.

解决方案

Use jQuery:


("#your_grid_id").on ("click", "input[type=checkbox]", function () { if (this.checked)


(this).css("backgroud-color", "green"); else


这篇关于需要在运行时更改复选框的颜色。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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