If you don't understand then please see a preview of this script click on the below preview button to see the demo of password protected page. The password of the preview page is "test".
PREVIEW
Now if you see the preview then I hope you understand what I want to tell you. So many readers of this article tell me this, not an approved version! For who tells this I tell him you can't customize this boxed because this is not run by your theme CSS it's run by the alert box of the browser. All browser has a different kind of dialogs box.
The benefit of this script
There are so many benefits to this script. So those are some highlighted features of this script:
- Protect page or post.
- Save your personal docs.
- No ignorable points.
- Many more...
How to add this script on post or page
If you want to add this password script on your blog post/page then follow all the bellow steps I am telling you:
- Open your post editor in the HTML view of the blogger.
- Now copy the below code and paste it on the below of your post/page HTML view.
- Now open change password text with your password and add your blog homepage URL on the URL text.
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var password = 'password'
password=prompt('Please enter the password to enter this post:','');
if (password != 'password') {
location.href='URL';
}
// End -->
</SCRIPT>
Conclosing
Now after this code adding done don't forget me give a small thanks. You can also give your feedback on the comment section it's always opened for you. Thanks for stay with us.
comment 0 Comments
more_vert