How to alternate HTML table row colors using JSP?

后端 未结 6 1532
你的背包
你的背包 2020-12-05 17:35

How do I alternate HTML table row colors using JSP?

My CSS looks something like:

tr.odd {background-color: #EEDDEE}
tr.even {background-color: #EEEED         


        
6条回答
  •  情话喂你
    2020-12-05 18:28

    If you are willing to make this happen on the client side, you can do Zebra Striping with JQuery.

    It would be done with just a couple lines of code, but you would have to include the jquery library in your file.

    http://docs.jquery.com/Tutorials:Zebra_Striping_Made_Easy

    http://docs.jquery.com/Selectors/odd

    http://docs.jquery.com/Selectors/even

提交回复
热议问题