You can use the following command to lock the website:
<SCRIPT language=JavaScript>
function password() {
var testV = 1;
var pass1 = prompt('Please enter password:','');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1 == "Enter the password you want to set here") {
alert('Password correct!');
break;
}
testV+=-1;
var pass1 = prompt('Bad password!') Please re-enter :');
}
if (pass1!="password" & testV ==3)
history.go(-1);
return " ";
}
document.write(password());
</SCRIPT>
It must be added <head>
before 'head', otherwise it will not take effect