pasword protected page in javascript

Solutions on MaxInterview for pasword protected page in javascript by the best coders in the world

showing results for - "pasword protected page in javascript"
Marylou
02 Jun 2018
1
2<SCRIPT>
3function passWord() {
4var testV = 1;
5var pass1 = prompt('Please Enter Your Password',' ');
6while (testV < 3) {
7if (!pass1)
8history.go(-1);
9if (pass1.toLowerCase() == "letmein") {
10alert('You Got it Right!');
11window.open('https://youtu.be/dQw4w9WgXcQ');
12break;
13}
14testV+=1;
15var pass1 =
16prompt('Access Denied - Password Incorrect, Please Try Again.','Password');
17}
18if (pass1.toLowerCase()!="password" & testV ==3)
19history.go(-1);
20return " ";
21}
22</SCRIPT>
23<CENTER>
24<FORM>
25<input type="button" value="Enter Protected Area" onClick="passWord()">
26</FORM>
27</CENTER>