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? Link to comment https://forums.phpfreaks.com/topic/30065-solved-onclick/ Share on other sites More sharing options...
emehrkay Posted December 9, 2006 Share Posted December 9, 2006 i think in js its backgroundColor Link to comment https://forums.phpfreaks.com/topic/30065-solved-onclick/#findComment-138221 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] Link to comment https://forums.phpfreaks.com/topic/30065-solved-onclick/#findComment-138222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.