When I click some image on my site, I want it to ask for a password and check if its right. If the correct password is entered, then go to the site. But i'm pretty new to site making. I am aware that webpage code is open source. Just inspect element and boom. So this password protection code that I came up with is pretty useless.
var userResponse = "N/A";
function askPass() {
"use strict";
userResponse = prompt("What's the password?", "000000");
if (userResponse === "SpeculAcessPls") {
window.open("www.link.com");
}
}
What can I do to make my password more secure?