Home > Web Front-end > JS Tutorial > body text

jQuery table alternate row color change code [revised annotated version]_jquery

WBOY
Release: 2016-05-16 18:58:45
Original
1070 people have browsed it

Copy code The code is as follows:

.org/1999/xhtml">


< title>jquery odd and even color change

< ;script>
$(document).ready(function() {
$('tr').addClass('odd');
$('tr:even').addClass('even '); //Odd and even color change, add style
});










🎜>




< ;tr>






🎜>


;

As You Like It
All's Well that Ends Well
Hamlet Tragedy
Macbeth Tragedy
Romeo and Juliet Tragedy
History
Henry V





The following is a js version, required Friends can refer to it.






Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template