Home > Web Front-end > JS Tutorial > The color changing effect of table columns (rows) makes the table structure clearer_Other special effects

The color changing effect of table columns (rows) makes the table structure clearer_Other special effects

WBOY
Release: 2016-05-16 17:45:44
Original
1303 people have browsed it

[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]<script> window.onload = function(){ //returnColor("test"); setColor("test"); } function setColor(id) { var trs=document.getElementById(id).getElementsByTagName("tr"); for(var i=0; i<trs.length; i++) { var tds = trs[i].getElementsByTagName("td"); for(var j=0; j<tds.length; j++) { if(j%2==1) { tds[j].className="over"; } else { tds[j].className="out"; } } } } </script>
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