How to chang bgcolor of row when mouse selected a row?

C

Charles Shao

How to chang bgcolor of row when mouse selected a row?

I have a HTML table in the page. I hope to change <tr.bgcolor> when user
clicks on a column, just like user has selected this row.

How can I do that ?

Thanks

Charles Shao:)
 
E

Eliyahu Goldin

You should setup client-side onclick event for evry <tr>. In the event
handler you can change bgcolor for the new-clicked row and restore normal
color for the previously clicked row. Store the reference to the
previously-clicked row in a javascript variable.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top