First define two styles about the background color
tag is the id object
c1 is style 1
c2 is style 2
<script> <br>function changeRowsBg(tag,c1,c2) { <br> var i = 0; <br> var obj_tag = document .getElementsByTagName(tag); .className = c2; <br> } <br>} <br></script>