css代码
<style> .even{background:#FFF38F;} .odd{background:#FFFFEE;} .selected{background:#FF9900;} </style>
jquery代码
<script type="text/javascript"> $(function(){ $("tr:odd").addClass("odd"); $("tr:even").addClass("even"); }); </script>
css代码
<style> .even{background:#FFF38F;} .odd{background:#FFFFEE;} .selected{background:#FF9900;} </style>
jquery代码
<script type="text/javascript"> $(function(){ $("tr:odd").addClass("odd"); $("tr:even").addClass("even"); }); </script>
转载于:https://www.cnblogs.com/hwaggLee/p/4524031.html