tag:blogger.com,1999:blog-50988337131552269252024-03-27T20:54:22.351-03:00Disponibilidad Consultorios MansillaUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-5098833713155226925.post-41409880547882438462024-03-27T18:51:00.000-03:002024-03-27T18:51:01.191-03:00 <!DOCTYPE html>
<html>
<head>
<title>Disponibilidad Mansilla</title>
<style>
table {
border-collapse: collapse;
width: 100%;
font-size: 14px;
}
th, td {
text-align: center;
padding: 10px;
border: 1px solid #ddd;
}
th {
background-color: #659ACA;
color: white;
}
tr:nth-child(even) {background-color: #f2f2f2}
caption {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
}
</style>
</head>
<body>
<h1> </h1>
<table id="tabla">
<thead>
<tr>
<th>Mes</th>
<th>Día de la semana</th>
<th>Día del mes</th>
<th>Hora</th>
<th>Cantidad disponible</th>
</tr>
</thead>
<tbody id="tabla-body"></tbody>
</table>
<script> // !!!! PEGAR EL TEXTO DESPUES DE: " const tablaText=` " ANTES DEL: " `; " !!!!
const tablaText =`
abril miercoles 3 9 7
abril miercoles 3 10 5
abril miercoles 3 11 4
abril miercoles 3 12 3
abril miercoles 3 13 2
abril miercoles 3 14 4
abril miercoles 3 15 3
abril miercoles 3 16 2
abril miercoles 3 17 1
abril miercoles 3 18 1
abril miercoles 3 19 2
abril jueves 4 9 6
abril jueves 4 10 3
abril jueves 4 11 3
abril jueves 4 12 6
abril jueves 4 13 4
abril jueves 4 14 3
abril jueves 4 15 4
abril jueves 4 16 2
abril jueves 4 17 1
abril jueves 4 19 1
`;
const lineas = tablaText.trim().split('\n');
const datos = lineas.map(linea => linea.trim().split('\t'));
const tablaHtml = document.getElementById('tabla');
datos.forEach((fila, i) => {
const tr = document.createElement('tr');
fila.forEach((dato, j) => {
const td = document.createElement('td');
td.textContent = dato;
tr.appendChild(td);
});
tablaHtml.appendChild(tr);
});
</script>
</body>
</html>Unknownnoreply@blogger.com