Quando aperto o botão só dá o resultado de "ELSE"! Mesmo se o "IF" está certo (Formulário de Login).
<CODE>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form Contato</title>
</head>
<style>
*{margin: 0;padding: 0%;box-sizing:border-box;}
body{
background-color: cornflowerblue;
}
form{
background-color: cornsilk;
max-width: 500px;
width: 70%;
padding:20px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
form h3{
text-align: center;
color: crimson;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
form input[type=email],
form input[type=password]{
width: 100%;
height: 45px;
border: 1px solid #cccccc;
padding-left: 10px;
margin: 10px 0;
}
button[type=submit]{
width: 100%;
height: 30px;
cursor: pointer;
background: crimson;
color:white ;
border: 0;
border-radius: 20px;
transition: 1s;
}
form input[type=submit]:hover{
background-color: crimson;
}
</style>
<body>
<form>
<h3>Formulario Para Contato</h3>
<input type="email" id="emailus" name="E-mail" placeholder="Digite seu E-mail" required/>
<input type="password" id="senhaus" name="senha" placeholder="Digite sua Senha..." required/>
<button type="submit" onclick="funçaoParaExecutar()">Entrar</button>
</form>
<script>{
function funçaoParaExecutar ()
{
let email = document.getElementById('emailus')
let password = document.getElementById('senhaus')
if(email == "
[email protected]" && password == "1519")
{
alert('DENTRO')
}
else{
alert('fora')
}
}
}
</script>
</body>
</html>