Home  >  Article  >  Web Front-end  >  JS implements two-color table implementation code_javascript skills

JS implements two-color table implementation code_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:41:111183browse
clip_image001The principle is actually very simple: use getElementsByTagName to get all elements, and then add background colors to the elements of odd and even items respectively.
Core code:
Copy code The code is as follows:















/td>



Li Si













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
name Achievements
Zhang San 中文 90
Mathematics 87
Mathematics 68
王五 English 76