Está en la página 1de 2

<!

DOCTYPE html>
<head>
<form method="post" action=" "
name="datos1" id="datos1">
Nombre: <input type="text"
name="tabla1" id="tabla1">
</form>
<script>
function dibujatabla1()
{
document.write("<h2>Tabla de mis enlaces favoritos</h2>");

document.write("<table border=1>");
document.write('<tr
id="fila1"><th>Buscadores</th><th>Noticias</th><th>Música</th></tr>');

document.write('<tr id="fila2"><td> <a


href="https://www.google.com/">Google</a> </td> <td><a
href="https://elpais.com/">Diario El pais</a></td> <td><a
href="https://www.spotify.com/">Spotify</a></td></tr>');

document.write('<tr id="fila3"><td><a href="https://es.yahoo.com/?p=us">Página


de Yahoo</a></td><td><a href="https://www.elmundo.es/">Diario El
mundo</a></td><td><a href="https://www.deezer.com/es/">Deezer</a></td></tr>');

document.write('<tr id="fila3"><td><a href="https://www.bing.com/?


setlang=es">Página de Bing</a></td><td><a href="https://www.bbc.com/mundo">BCC
news</td><td><a href="https://www.youtube.com/">Youtube</td></tr>');

document.write('</table>');

/*
document.
getElementById("tabla1").
value;

document.forms.datos1.
elements.tabla1.value;

document.forms[0].
tabla1.value;
document.datos1.tabla1.value;*/
}
</script>
</head>
<body>
<form>
<input type='button' value=' Dibuja Tabla. '
onclick='dibujatabla1();'>
</form>
</body></html>

<!DOCTYPE html>
<head>
<form method="post" action=" "
name="datos2" id="datos2">
Nombre: <input type="text"
name="tabla2" id="tabla2">
</form>
<script>
function dibujatabla()
{
document.write("<h1>Tabla con mis fotos</h1>");

document.write("<table border=1 >");

document.write('<tr id="fila1"><th><img src="Valladolid/Valladolid1.jpg"> </th>


<th><img src="Valladolid/Valladolid5.jpg"></th> </tr>');

document.write('<tr id="fila2"><td> <img src="Valladolid/Valladolid3.jpg">


</td> <td> <img src="Valladolid/Valladolid4.jpg"></td> </tr>');

document.write('</table>');

document.
getElementById("tabla2").
value;

document.forms.datos2.
elements.tabla2.value;

document.forms[0].
tabla2.value;
document.datos2.tabla2.value;
}
</script>
</head>
<body>
<form>
<input type='button' value=' Dibuja Tabla. '
onclick='dibujatabla();'>
</form>
</body></html>

También podría gustarte