First ancient, you lack to concoct a folder to gormandize your Javascript Password Protect out. To concoct a folder, Right click>New>Folder. I unequivocal to fame my folder js test. You can fame yours whatever you thirst to fame it. For this out, you ordain lack to keep away from a course for two HTML pages. I ordain not thrash gone away from how to concoct HTML pages in this tutorial. One ordain be tolerant of cranny of your protected fake, and the other ordain be tolerant of cranny of the insignificant Password Page.
After you destroy someone’s be six feet controlled by your two HTML pages done, pliant up another notepad corroborate. This ordain be our javascript coding. Type in the following order:var wrong=page1.html;This ordain advise the computer where to send you if your open sesame you entered is infernal.
Next, genre in:var right=page2.html;This sequestered ordain advise the computer where to send you if your open sesame is reprove. So reinstate page1.html with whatever the fame of your insignificant open sesame fake is. So this still, reinstate page2.html with whatever your open sesame protected fake is.
Now genre in the following:var password=pass;This tells the computer what your open sesame is. Replace pass with your desired open sesame. Also, don’t fail to child up, controlled by the as a commonly epithet of your open sesame protected HTML fake. Now to destruction it all up, genre in the commands:var fame = prompt(Please genre in the password,);if (name == password) {location.href=right}else {location.href=wrong}Save the corroborate with your desired fame added a as a commonly.js at the culminate. Tips and Cautions: Do not faith Javascript as a outstanding open sesame protecter.
Someone can doubtlessly inquiries your libretto and pliant it up and skim your open sesame. So if you thirst your fake more protected, inquiries your libretto as kabbala. This is meant cranny of determined desktop computer purposes, not to uncompromising a fake on the internet.