CSS: set color for selected row in a table

前端 未结 4 671
無奈伤痛
無奈伤痛 2020-12-31 23:28

I need to add the following feature to my table:

When the user clicks on a row (selects it), the row is marked with the color #FFCF8B (the same as

4条回答
  •  醉酒成梦
    2020-12-31 23:47

    Here's a fiddle using dojo. Same concepts that everyone else has mentioned.

    http://jsfiddle.net/cswing/SG9dp/

    NOTE: I allowed multiple rows to be selected. Question didn't state the requirement.

提交回复
热议问题