I want to put a password on the page when it is accessed (simple), in a window (type alert) with password that appears before loading the page, I wanted this custom "alert" just like a modal or any custom window ...
Very simple even people are children's page ...
code that I'm using:
<script language=javascript>
senha = '123456';
senhadig = prompt("Digite a senha","")
if (senha != senhadig){
top.location.href='erro.html';
}
</script>
Important that you can not see the background before entering the correct password ...
Same as above but wanted to leave custom, can be with jquery, I already searched for websites about dialog boxes but I could not ...
I am not concerned about safety, it is for small children (students), so they do not advance without permission. but I put in unescape and use noscript = D