Jquery CSS sets an example of the odd and even row background color of the table

  • 2020-03-30 03:11:50
  • OfStack

 
<style> 
.even{background:#FFF38F;} 
.odd{background:#FFFFEE;} 
.selected{background:#FF9900;} 
</style> 

 
<script type="text/javascript"> 
$(function(){ 
$("tr:odd").addClass("odd"); 
$("tr:even").addClass("even"); 
}); 
</script> 

Related articles: