I am trying to make a login page for my project I am working on and I came across this error while trying to run the code. I have no idea what is causing it.
Here is my code:
function login() {
var userEmail = document.getElementById("email").value;
var userPass = document.getElementById("password").value;
window.alert(userEmail + " " + userPass);
}
<input name="login" id="login" class="btn btn-block login-btn mb-4" type="button" value="Login" onclick="login()">
Do you know what’s happening?
Thanks