Home > Web Front-end > JS Tutorial > Core JS code for setting different colors for table odd and even rows_jquery

Core JS code for setting different colors for table odd and even rows_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 17:07:28
Original
1038 people have browsed it

This is a more practical function. After setting the odd and even rows to different colors, the experience of reading table data will obviously become better. Otherwise, the data will appear very complicated and crowded (the experience will be especially obvious when there are many rows of table data). Only when you actually do something in this area will you have a strong experience. Anyway, I just experienced it, so leave it here for reference~

The core JS script code is as follows (the id of the table element is based on Adjust according to your own situation. The jquery-1.7.min.js in the code can be downloaded from jquery’s official website)

Copy the code Code As follows:


Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template