ok, i have one table.... when i click on one of the td's i need that this td change his bgcolor to someelse. how i do it ?
Here.. <table> <tr> <td onclick="this.style.backgroundColor='#00FF00'">Test</td> </tr> </table> HTML: Hope that solves your issue.
i do this like that echo "<td id=$id-1 style='background-color:red' onclick='this.style.backgroundcolor='blue';'>"; PHP: but its dont work
echo "<td id=$id-1 style='background-color:red' onclick=\"this.style.backgroundColor='blue'\">"; Code (markup): That should fix it. Be careful with your single and double quotes and its backgroundColor with "C" and not "c".