You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

91 lines
2.4 KiB

<!DOCTYPE html>
<html>
<head>
<title>Tabela</title>
<link rel="stylesheet" href="styles/base.css" />
<link rel="stylesheet" href="styles/tabela.css" />
</head>
<body>
<script>
document.addEventListener(
'scroll', (e) => {
const titulo = document.getElementById('titulo')
titulo.innerHTML = `
Posi&ccedil;&atilde;o Scroll:
${window.scrollX}, ${parseInt(window.scrollY)}
`
if (window.scrollY > 50) {
titulo.style.color = 'yellow'
} else {
titulo.style.color = 'white'
}
}
)
</script>
<header
onmouseover="this.style.backgroundColor = 'black'"
onmouseout="this.style.backgroundColor = 'grey'">
<h1 id="titulo" class="titulo-pagina">Minha Tabela</h1>
<p>
<a href="index.html">Index</a>
&middot;
<a href="tabela.html">Tabela</a>
&middot;
<a href="formulario.html">Formul&aacute;rio</a>
</p>
</header>
<main>
<div><p id="lista-marcas"></p></div>
<script>
const tituloPagina = document.querySelector('.titulo-pagina')
tituloPagina.innerText = tituloPagina.innerText.toUpperCase()
const marcas = [
"Azimut", "Benetou", "Ford",
"Reanault", "Volkswagen"
]
document.getElementById("lista-marcas").innerText = marcas.join(' | ')
</script>
<button onClick="clicaAqui()">Clica Aqui!</button>
<script>
function clicaAqui() {
alert('Clicado!')
}
</script>
<table class="tabela tabela-espaco-interno" cellspacing="0" cellpadding="0" border="0">
<thead>
<tr>
<th>Tipo</th>
<th>Marca</th>
<th>Quantidade</th>
</tr>
</thead>
<tbody>
<tr>
<td>Carro</td>
<td>Ford</td>
<td>10</td>
</tr>
<tr>
<td rowspan="2" valign="top">Barco</td>
<td>Benetou</td>
<td>20</td>
</tr>
<tr>
<!--td>Barco</td-->
<td>Azimut</td>
<td>14</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="2" align="right">Total</th>
<!--th></th-->
<td>44</td>
</tr>
</tfoot>
</table>
</main>
</body>
</html>