Thursday, 29 August 2013

Can you change a table background attribute with javascript?

Can you change a table background attribute with javascript?

How can I change the background attribute of a table with JQuery?
I do not want to use the style.background attribute. It needs to be the
background attribute of the table. Yes, I know this is deprecated but I'm
working with Google's Caja and that strips out any background-image css
properties, but not backgrounds in tables. All very odd but I'd like to
get this working.
I need:
<table background="image.png" border="1" bordercolor="#888" cellspacing="0" >
<tbody>
<tr>
<td style="width: 60px;">&nbsp;</td>
</tr>
<tr>
<td style="width: 60px;">&nbsp;</td>
</tr>
</tbody>
</table>

No comments:

Post a Comment