I want to send the background color of an element to a function using javascript for example:
<td style="background-color:#ff0000" onClick="getColor()"></td>
Could anyone please give me a pointer as to what I have to do in the getColor() function?
Modify the call to send the object as param. Like this-
And the function would be-
change this to:
And this would be the javasctipt:
If jQuery is ok: