Jquery changes the color of the line, click the color change, hover the mouse over the current line to change the color, and then restore the primary color. Green indicates the color after the click. Gray: The color of the mouse. <script type = "text/javascript" >$ (function () {odd_even (); $ (". nlist_1s "). each (function () {var _ color = (this).css ("backgroundColor"); $ (this ). hover (function () {if (parseInt ($ (this ). attr ("class "). indexOf ("checked") =-1) {response (this).css ({"backgroundColor": "# cccccc", "color": "black "});}}, function () {if (parseInt ($ (this ). attr ("class "). indexOf ("checked") =-1) {response (this).css ({"backgroundColor": _ color, "color": "#535353 "});}}); $ (this ). click (function () {// all rows odd_even (); // The current row expires (this).css ({"backgroundColor": "#479423", "color ": "# ffffff "}). addClass ("checked") ;}) ;}; function odd_even () {// the first row of an even number is 0 rows $ (". nlist_1s: odd ").css ({" backgroundColor ":" # E5F5FF "," color ":" #535353 "}); // an odd number of rows $ (". nlist_1s: even ").css ({" backgroundColor ":" transparent "," color ":" #535353 "}) ;}</script>