Código HTML:
<html> <head> <script language="javascript"> function cambia_color(){ document.getElementById('tabla').style.backgroundImage='Recursos/cuadradorojo.JPG'; } </script> </head> <body> <table width="100%" border="1" background="Recursos/cuadradoazul.JPG" id="tabla" > <tr> <td >Blah blah blah</td> </tr> </table> </body> </html> <?php echo (' <script type="text/javascript"> cambia_color() </script>'); ?>
(Aun quitando el background image que tiene la tabla sigue sin funcionar.