Jump to content

[SOLVED] onClick


chiprivers

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.