jquery点击tr换tr的背景颜色,table的id为db-list1
jQuery(function() { jQuery("#db-list1 tr").click( function() { if (jQuery(this).hasClass("selected")) { jQuery(this).removeClass("selected"); jQuery(this).css("backgroundColor", "#ffffff"); jQuery(this).children().eq(1).children().attr('checked', false); } else { jQuery(this).addClass("selected"); jQuery(this).css("backgroundColor", "#b0d8ff"); jQuery(this).children().eq(1).children().attr('checked', true); } }); });

 

相关文章:

  • 2021-08-28
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-05-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案