Você está na página 1de 7

Unidad 6.

Antecedentes de JavaScript
Desarrollo de pginas web

Ejemplo1.html

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Formulario</title>
<meta content="Utel" name="author">
<meta content="BlueGriffon wysiwyg editor" name="generator">
</head>
<body>
<form>
<h1>Bienvenido</h1>
Introduce tu nombre: <input name="nombre" type="text"> <br>
Mensaje: <input name="mensaje" size="60" type="text"> <br>
<input value="Probar" type="submit"> </form>

</body>
</html>

1
Unidad 6. Antecedentes de JavaScript
Desarrollo de pginas web

Ejemplo2.html

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Formulario</title>
<meta content="Utel" name="author">
<meta content="BlueGriffon wysiwyg editor" name="generator">
</head>
<body>
<form action="mailto:micorreo@utel.edu.mx"method="post" enctype="text/plain">
<h1>Bienvenido</h1>
Introduce tu nombre: <input name="nombre" type="text"> <br>
Mensaje: <input name="mensaje" size="60" type="text"> <br>
<input value="Probar" type="submit"> </form>

</body>
</html>

2
Unidad 6. Antecedentes de JavaScript
Desarrollo de pginas web

Ejemplo3.html

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Formulario</title>
<meta content="Utel" name="author">
<meta content="BlueGriffon wysiwyg editor" name="generator">
<script type="text/javascript">
function probar () {
alert ("hola "+document.getElementsByName("nombre")[0].value);
}
</script>
</head>
<body>
<form action="" method="post" enctype="text/plain">
<h1 id="nombre">Bienvenido</h1>
Introduce tu nombre: <input name="nombre" type="text"> <br>
Mensaje: <input name="mensaje" size="60" type="text"> <br>
<input value="Probar" type="submit" onClick="javascript: probar()"> </form>

</body>
</html>

3
Unidad 6. Antecedentes de JavaScript
Desarrollo de pginas web

Ejemplo4.html

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Formulario</title>
<meta content="Utel" name="author">
<meta content="BlueGriffon wysiwyg editor" name="generator">
</head>
<body>
<form action="mailto:micorreo@utel.edu.mx"method="post" enctype="text/plain">
<h1>Bienvenido</h1>
Introduce tu nombre: <input name="nombre" type="text"> <br>
Mensaje: <input name="mensaje" size="60" type="text"> <br>
<br />
Selecciona el color de tu icono:<br />
<input type="radio" name="coloricono" value="rojo" /> Rojo<br />
<input type="radio" name="coloricono" value="verde" /> Verde <br />
<input type="radio" name="coloricono" value="azul" /> Azul <br />
<input value="Probar" type="submit"> </form>

</body>
</html>

4
Unidad 6. Antecedentes de JavaScript
Desarrollo de pginas web

Ejemplo5.html

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Formulario</title>
<meta content="Utel" name="author">
<meta content="BlueGriffon wysiwyg editor" name="generator">
</head>
<body>
<form action="mailto:micorreo@utel.edu.mx"method="post" enctype="text/plain">
<h1>Bienvenido</h1>
Introduce tu nombre: <input name="nombre" type="text"> <br>
Mensaje: <textarea name="mensaje" cols="60" rows="6"></textarea> <br>
<br />
<hr />
<input type="button" value="Haz clic sobre mi"
onclick="javascript:window.location='http://www.google.com'" />
<hr />
Selecciona el color de tu icono:<br />
<input type="radio" name="coloricono" value="rojo" /> Rojo<br />
<input type="radio" name="coloricono" value="verde" /> Verde <br />
<input type="radio" name="coloricono" value="azul" /> Azul <br />
<hr />
Selecciona los d&iacute;as con disponibilidad:<br />
<input type="checkbox" name="dias" value="l" /> Lunes<br />
<input type="checkbox" name="dias" value="m" />Martes<br />
<input type="checkbox" name="dias" value="mm" />Mi&eacute;rcoles<br />
<input type="checkbox" name="dias" value="j" />Jueves<br />
<input type="checkbox" name="dias" value="v" />Viernes<br />
<hr />
Selecciona el d&iacute;as preferente:<br />
<select>
<option value=""> Seleccione un d&iacute;a</option>
<option value="l"> Lunes</option>
<option value="m">Martes</option>
<option value="mm">Mi&eacute;rcoles</option>
<option value="j">Jueves</option>
<option value="v">Viernes</option>
</select>
<hr />
Adjunta tu curriculum vitae <input type="file" name="curriculum" />
<hr />
<input type="submit" value="Haz clic para enviar la informac&iacute;on" />

5
Unidad 6. Antecedentes de JavaScript
Desarrollo de pginas web

<input type="reset" value="Comenzar a rellenar de nuevo" />

</body>
</html>

6
Unidad 6. Antecedentes de JavaScript
Desarrollo de pginas web

Ejemplo6.html

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Formulario</title>
<meta content="Utel" name="author">
<meta content="BlueGriffon wysiwyg editor" name="generator">
<script language="JavaScript">

function mostrar_tecla(e)
{
if (e.keyCode) keycode=e.keyCode;
else keycode=e.which;
document.getElementById('zonadeteclas').innerHTML =
document.getElementById('zonadeteclas').innerHTML + String.fromCharCode(keycode);

}
</script>
</head>
<body onkeypress="mostrar_tecla(event);">
<p>
Prueba de teclas: <span id="zonadeteclas"></span>
</p>
</body>
</html>

Você também pode gostar