Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <script>function validaDatos() {
- var usario = document.getElementById("user");
- var password = document.getElementById("pass");
- if ((usuario.value == "" || usuario.value == '' || usuario.value == null)
- && (password.value == "" || password.value == '' || password.value == null)) {
- alert("Ingresa tu Usuario y password");
- run.focus();
- return false;
- } else if (usuario.value == "" || usuario.value == ''
- || usuario.value == null) {
- alert("Ingresa tu Usuario");
- usuario.focus();
- return false;
- } else if (password.value == "" || password.value == ''
- || password.value == null) {
- alert("Ingresa tu Pasword");
- password.focus();
- return false;
- } else {
- }
- return true;
- }
- </script>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>REGISTRAR</title>
- </head>
- <body>
- <form action = "ServletEncriptar" method = "post" onsubmit="return validaDatos();">
- <center>
- Ingrese Usuario:
- <input type = "text" name = "user">
- <br><br>
- Ingrese password:
- <input type = "password" name = "pass">
- <br><br>
- <input type="submit" style="width:80px" value="Registrarse">
- </center>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement