Home >Web Front-end >JS Tutorial >How to do multi-line method of interlaced color change in html document_javascript skills

How to do multi-line method of interlaced color change in html document_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:20:361836browse

Since you all know that the color is changed every other row, then just change the color every other row. There are many ways.
The most direct way is to add bgcolor="red" directly to the in each line.
If you use css, define two color classes. Just use this class alternately on each line. For example:
tr class="trClass1"
tr class="trClass2"


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute ]

Recommended 1
Statement:
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