function funcao1(){
let email = document.getElementById('mail');
let botao = document.getElementById('bot');
let senha1 = document.getElementById('senha ');
let teste = "[email protected]";
if (email == teste) {
window.location.href = "http://www.devmedia.com.br/";
} else {
alert('Deu ruim');
alert(' Verifique se os campos foram colocados corretamente');
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Netflix</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<header>
<h1 id="log">NETFLIX</h1>
</header>
<body>
<main>
<h1 id="login">Login</h1>
<br/><br/>
<input id="mail" type="text" placeholder="Seu email aqui" />
<br/><br/>
<input id="senha" type="password" placeholder="Seu senha aqui" />
<br/><br/><br/>
<input class="bot " id="bot" type="button" onclick="funcao1()" value="Exibir Alert" />
</main>
</body>
</html>
let email = document.getElementById('mail').value