0
나는 암호를 요구하는 사이트를 만들고 있지만 일단 암호 프롬프트가 나타나면 다시 돌아 가기가 너무 어렵습니다. 암호의 목적은 사용자가 페이지와 페이지 소스를 보지 못하게하는 것입니다.
여기에 내가 지금까지이 작업은 다음과 같습니다닫기 탭/취소를 누르면 리디렉션?
do{
$('html').hide(); //hiding html with jQuery
var pass = "password"; //setting password
var selection = prompt("Enter password", ""); //prompting for password
if(selection == "cancel"){
window.location.href = "http://www.example.com/";
}; //trying (unsuccesfully) to make the page redirect if user answers "cancel"
} while(selection!=pass);
내 테스트에서 발생하지 않는 취소 버튼을 누를 때 리디렉션해야합니다. –
답변을 업데이트했습니다. – hansottowirtz
정말 고마워요. D –