If the password is not correct, stop loading the site
function passCheck() { var password = '1234' var input = prompt('Enter password...') if (input != password ){ document.write('Access Denied') } else { document.write('Access Granted') } } passCheck();