I was trying to make a user entry in local and write this code but always “else”
working even if i write correct info. Can you help me with making this code working ?
var email1 = "[email protected]";
var password1 = "1234";
var eposta = document.getElementById("email");
var sifre = document.getElementById("pass");
function login() {
if (eposta == email1 && sifre == password1) {
window.location.href = "products.html";
alert("Welcome", email1);
}
else {
alert("Wrong e-mail or password")
}
}