skip to Main Content

Why doesn't this document.innerHTML function work?

I am not sure why if you trigger the function, nothing happens loginButton.addEventListener("click", function() { const password = document.getElementById("password").value; if (password === "password") { alert("Correct!"); document.innerHTML = <embed src="http://stackoverflow.com" style="width:500px; height: 700px;"></embed>; } else { loginMessage.textContent = "Invalid password."; }…

VIEW QUESTION
Back To Top
Search