代码如下:
             //通过checkbox的单击事件来判断checkbox是否选中
             $('#grdList tr td').children("[type='checkbox']").click( function () {
               
//如果选中,增加背景颜色。否则,背景无色
               if( $(this).attr("checked")==true
               {
                    $(
this).parent().css("backgroundColor","GreenYellow");
               }
               
else
               {
                     $(
this).parent().css("backgroundColor","");
               }
            });

相关文章:

  • 2021-12-09
  • 2021-11-28
  • 2022-12-23
猜你喜欢
  • 2022-01-06
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
相关资源
相似解决方案