Advertisement
panxho999

Untitled

Nov 20th, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.38 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.  
  7.  
  8.  
  9. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  10. <title>REGISTRAR</title>
  11. </head>
  12.  
  13.  
  14. <script>
  15. function validaDatos() {
  16.  
  17. var usuario = document.getElementById("user");
  18. var password = document.getElementById("pass");
  19.  
  20. if ((usuario.value == "" || usuario.value == '' || usuario.value == null)
  21. && (password.value == "" || password.value == '' || password.value == null)) {
  22.  
  23. alert("Ingresa tu Usuario y password");
  24.  
  25. run.focus();
  26.  
  27. return false;
  28.  
  29. } else if (usuario.value == "" || usuario.value == ''
  30. || usuario.value == null) {
  31.  
  32. alert("Ingresa tu Usuario");
  33.  
  34. usuario.focus();
  35.  
  36. return false;
  37.  
  38. } else if (password.value == "" || password.value == ''
  39. || password.value == null) {
  40.  
  41. alert("Ingresa tu Pasword");
  42.  
  43. password.focus();
  44.  
  45. return false;
  46.  
  47. } else {
  48. }
  49. return true;
  50. }
  51.  
  52. </script>
  53.  
  54.  
  55.  
  56.  
  57. <body>
  58.  
  59. <form action = "ServletEncriptar" method = "post" onsubmit="return validaDatos();">
  60. <center>
  61.  
  62. Ingrese Usuario:
  63. <input type = "text" name = "user">
  64. <br><br>
  65. Ingrese password:
  66. <input type = "password" name = "pass">
  67. <br><br>
  68. <input type="submit" style="width:80px"  value="Registrarse">
  69. </center>
  70. </form>
  71. </body>
  72. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement