Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/06/2014, 06:38
Xmarq
 
Fecha de Ingreso: junio-2014
Mensajes: 9
Antigüedad: 9 años, 10 meses
Puntos: 0
Como cambiar el color de una celda con un boton

Hola mi problema es el siguiente:

Tengo una tabla mas o menos asi:

Código HTML:
<table>
            <tr>
                <th>User</th>
                <th>08:00-10:00</th>
                <th>10:00-12:00</th>
                <th>13:00-15:00</th>
                <th>15:00-17:00</th>
                <th>17:00-19:00</th>
                <th>Comentarios</th>
            </tr>
            <tr>
                <th><p id="message"></p></th>
                <th><button onclick="'selection();">X</button> </th>
                <th><button onclick="'selection();">X</button></th>
                <th><button onclick="'selection();">X</button></th>
                <th><button onclick="'selection();">X</button></th>
                <th><button onclick="'selection();">X</button></th>
                <th></th>

            </tr>
        </table> 
Como veis cada celda es un boton, lo que quiero conseguir es q clicando en ese boton se cambie el color del background de esa unica celda.
Alguna idea de como hacerlo??
Muchas gracias!

Última edición por Xmarq; 23/06/2014 a las 06:43