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

Discussion in 'ASP .Net' started by Charles Shao, Apr 18, 2005.

  1. Charles Shao

    Charles Shao Guest

    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:)
     
    Charles Shao, Apr 18, 2005
    #1
    1. Advertisements

  2. 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
     
    Eliyahu Goldin, Apr 18, 2005
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.