SHARE
TWEET

Untitled

a guest Jun 15th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <HTML>
  2. <head>
  3. <title> Login em JavaScript </title>
  4. <script language="javascript">
  5. <!-- Begin
  6. function Login(){
  7. var done=0;
  8. var username=document.login.username.value;
  9. username=username.toLowerCase();
  10. var password=document.login.password.value;
  11. password=password.toLowerCase();
  12. if (username=="minato" && password=="namikaze") { //Aqui voce muda para o nome de usuario e senha. Só coloque em letras minusculas.
  13. window.location="exemplo.html"; done=1;
  14. }
  15. if (done==0) { alert("Dados incorretos, tente novamente"); } //Aqui o alert se estiver errado.
  16. }
  17. //-->
  18. </script>
  19. </head>
  20.  
  21. <Body>
  22. <form name=login>
  23. Usuário:<br>
  24. <input type=text name=username size=20>
  25. <br><br>
  26. Senha:<br>
  27. <input type=password name=password size=20>
  28. <br><br>
  29. <input type=button value=Entrar onClick=Login()>
  30. </form>
  31. </Body>
  32. </HTML>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top