The CSS:
tr.row1 { background-color: #FFFFFF; }
tr.row2 { background-color: #E0E0FF; }
I am using pagination and the resul开发者_JAVA技巧ts show fine in IE but disappear in Chrome and Firefox when advancing forward from page 1.
Doesn't answer your question, but if the alternating row colour isn't crucial, you can do this with CSS3 nth-child selector, which works with newer versions of all browsers:
tr:nth-child(even) {background: #FFFFFF}
tr:nth-child(odd) {background: #E0E0FF}
精彩评论