Advertisement
panxho999

Untitled

Nov 20th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.37 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  2.    pageEncoding="ISO-8859-1"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <html>
  5. <head>
  6. <script>function validaDatos() {
  7.  
  8. var usario = document.getElementById("user");
  9. var password = document.getElementById("pass");
  10.  
  11. if ((usuario.value == "" || usuario.value == '' || usuario.value == null)
  12. && (password.value == "" || password.value == '' || password.value == null)) {
  13.  
  14. alert("Ingresa tu Usuario y password");
  15.  
  16. run.focus();
  17.  
  18. return false;
  19.  
  20. } else if (usuario.value == "" || usuario.value == ''
  21. || usuario.value == null) {
  22.  
  23. alert("Ingresa tu Usuario");
  24.  
  25. usuario.focus();
  26.  
  27. return false;
  28.  
  29. } else if (password.value == "" || password.value == ''
  30. || password.value == null) {
  31.  
  32. alert("Ingresa tu Pasword");
  33.  
  34. password.focus();
  35.  
  36. return false;
  37.  
  38. } else {
  39. }
  40. return true;
  41. }
  42. </script>
  43.  
  44.  
  45. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  46. <title>REGISTRAR</title>
  47. </head>
  48. <body>
  49.  
  50. <form action = "ServletEncriptar" method = "post" onsubmit="return validaDatos();">
  51. <center>
  52.  
  53. Ingrese Usuario:
  54. <input type = "text" name = "user">
  55. <br><br>
  56. Ingrese password:
  57. <input type = "password" name = "pass">
  58. <br><br>
  59. <input type="submit" style="width:80px"  value="Registrarse">
  60. </center>
  61. </form>
  62. </body>
  63. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement