I have created a table with javascript code, I can mark the cells and change color, but what I need is for me to save that data from the cells I have marked so that users of my website can save their available hours in the table.
<html lang="es">
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
<head>
<script language="javascript" type="text/javascript">
function ilumina(celda){
if (celda.style.backgroundColor=="yellow")
{
celda.style.backgroundColor="PeachPuff";
}
else
{
celda.style.backgroundColor="yellow";
}
}
</SCRIPT>
<table border="1" summary="Los grupos de música punk más famosos del Reino Unido">
<caption>CLICK ON THE CELLS TO SELECT YOUR AVAILABLE HOURS</caption>
<thead>
<tr>
<th scope="col">Grupo</th>
<th scope="col">Año de formación</th>
<th scope="col">Número de álbumes</th>
<th scope="col">Canción más conocida</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">LUNES</th>
<td bgcolor="PeachPuff" onclick="ilumina(this)">9-10 a.m</td>
<td bgcolor="PeachPuff" onclick="ilumina(this)">10-11 a.m</td>
<td bgcolor="PeachPuff" onclick="ilumina(this)">11-12 a.m</td>
</tr>
<tr>
<th scope="row">MARTES</th>
<td bgcolor="PeachPuff" onclick="ilumina(this)">9-10 a.m</td>
<td bgcolor="PeachPuff" onclick="ilumina(this)">10-11 a.m</td>
<td bgcolor="PeachPuff" onclick="ilumina(this)">11-12 a.m</td>
</tr>
<tr>
<th scope="row">MIERCOLES</th>
<td bgcolor="PeachPuff" onclick="ilumina(this)">9-10 a.m</td>
<td bgcolor="PeachPuff" onclick="ilumina(this)">10-11 a.m</td>
<td bgcolor="PeachPuff" onclick="ilumina(this)">11-12 a.m</td>
</tr>
</tbody>
</table>
PULSE SOBRE LAS CELDAS PARA SELECCIONAR SUS HORAS DISPONIBLES
</body>
<meta>
</html>
Comments
Post a Comment