Código HTML:
<html> <head> <title>Contacto</title> <link REL=StyleSheet HREF="../media/Formularios.css"> </head> <body> <script type="text/javascript"> function Comprobar(form){ var user=(form.name.value); var pass=(form.password.value); if ((user==2091923) & (pass==123)) location.href='notas.html'; else if ((user=="") | (pass=="")) alert("Por favor, complete los campos."); else alert("Usuario o clave incorrecta."); } </script> <div id="stylized" class="myform"> <form name="Ingresar" method="submit" onsubmit="Comprobar(Ingresar)"> <h1>Log in</h1> <label>Usuario <span class="small">Ingresa tu codigo</span> </label> <input type="text" name="name"/> <label>Contraseña <span class="small">Ingresa tu contraseña</span> </label> <input type="password" name="password"/> <button type="submit" >Entrar</button> <button type="reset">Borrar</button> <div class="spacer"></div> </form> </div> </body> </html>