The 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:
name |
| Achievements |
Zhang San |
中文 |
90 |
/td>
Mathematics |
87 |
Li Si
Mathematics |
68 |
王五 |
English |
76 |
table>