<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- PRIMER PASO: Copiar este formulario en el archivo prev1.htm -->
<form type="get" action="prev2.htm">
<div align="left"><table border="1" bgcolor="#00FFFF" cellspacing="0" cellpadding="0"
width="250">
<tr>
<td width="80"><small><font face="Arial">Nombre:</font></small></td>
<td width="170"><input type="text" name="nombre" size="14"></td>
</tr>
<tr>
<td width="80"><small><font face="Arial">Apellido:</font></small></td>
<td width="170"><input type="text" name="apellido" size="14"></td>
</tr>
<tr>
<td bgcolor="#000000" width="80"> </td>
<td bgcolor="#000000" width="170"><small><font face="Arial">
<input type="submit" value="ACCEDER"></font></small></td>
</tr>
</table>
</div>
</form>
nos lleva a otra pagina y nos muestra los datos que hemos ingresados con la fecha actual
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<!-- SEGUNDO PASO: Copiar este script en el archivo prev2.htm -->
<!-- Dentro de HEAD -->
<script LANGUAGE="JavaScript">
function getParams() {
var idx = document.URL.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
for (var i=0; i<pairs.length; i++) {
nameVal = pairs[i].split('=');
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
params = getParams();
</script>
<!-- Dentro de BODY -->
<script LANGUAGE="JavaScript">
nombre = unescape(params["nombre"]);
apellido = unescape(params["apellido"]);
email = unescape(params["email"]);
document.write("Nombre = " + nombre + "<br>");
document.write("Apellido = " + apellido + "<br>");
</script>
<script> document.write(new Date())
</script>
<body>
</body>
</html>