-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
-\r
-<html>\r
-<script Language="JavaScript">\r
-<!-- \r
-function FormValidator()\r
-{\r
-if ((form1.nombre.value.length < 3) || (form1.nombre.value.length > 10))\r
-{\r
-// Build alert box message showing how many characters entered\r
-mesg = "Nombre Invalido!";\r
-alert(mesg);\r
-// Place the cursor on the field for revision\r
-form1.nombre.focus();\r
-// return false to stop further processing\r
-return (false);\r
-}\r
-expresion = "^\\d*$";\r
-regEx = new RegExp(expresion);\r
-if ( !regEx.test(form1.edad.value) )\r
-{\r
- mesg = "Edad Invalida!";\r
- alert ( mesg );\r
- form1.edad.focus();\r
- return (false);\r
-}\r
-\r
-return (true);\r
-}\r
--->\r
-</script>\r
-<head>\r
-<title>INGRESO DE DATOS</title>\r
-</head>\r
-<body>\r
-<form name="form1" action="alta.php" method="POST" onsubmit="return FormValidator()">\r
- Nombre : <input type="text" name="nombre" /><br>\r
- Edad : <input type="text" name="edad" /><br>\r
- <input type="submit" value="Enviar">\r
-</form>\r
-</body>\r
-</html>\r