chiprivers Posted December 9, 2006 Share Posted December 9, 2006 I have a table which lists a set of records. I want the user to be able to click anywhere within a row of the table and on click, the background colour changes for the row clicked. I have tried this:<tr onClick="this.style.background-color='red'">But it does not work, any ideas? Quote Link to comment Share on other sites More sharing options...
emehrkay Posted December 9, 2006 Share Posted December 9, 2006 i think in js its backgroundColor Quote Link to comment Share on other sites More sharing options...
nuntius Posted December 9, 2006 Share Posted December 9, 2006 Ya try this instead:[code]<tr onClick="this.style.backgroundColor = 'red'">[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.