View Full Version : help| need ssome help.
yuri1992
Mar 14th 2008, 6:16 am
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 ?
rkquest
Mar 14th 2008, 6:50 am
Here..
<table>
<tr>
<td onclick="this.style.backgroundColor='#00FF00'">Test</td>
</tr>
</table>
Hope that solves your issue. :D
yuri1992
Mar 14th 2008, 7:50 am
Here..
<table>
<tr>
<td onclick="this.style.backgroundColor='#00FF00'">Test</td>
</tr>
</table>
Hope that solves your issue. :D
i do this like that
echo "<td id=$id-1 style='background-color:red' onclick='this.style.backgroundcolor='blue';'>";
but its dont work
rkquest
Mar 14th 2008, 6:50 pm
echo "<td id=$id-1 style='background-color:red' onclick=\"this.style.backgroundColor='blue'\">";
That should fix it. Be careful with your single and double quotes and its backgroundColor with "C" and not "c".
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.