Cara membuat password di halaman blogger
<script>
function verify() {
if (document.getElementById('password').value === 'Magelang1337') {
document.getElementById('HIDDENDIV').classList.remove("hidden");
document.getElementById('credentials').classList.add("hidden");
} else {
alert('Password Salah!');
password.setSelectionRange(0, password.value.length);
}
return false;
}
</script>
<style>
.hidden {display: none;}
.passwordku{padding:30px;background:#f3f3f3;border-radius:5px;width:300px;}
.buttonkls{padding:4px 20px 4px; 20px;background:#3e4282;color:#fff;width:80%;border-radius:5px;}
.inputpassw{padding:4px;background:#fff;color:#000;width:80%;text-align:center;border-radius:5px;margin-bottom:3px;}
.ketpassword{text-align:center;margin-bottom:5px;}
</style>
<center>
<div id="credentials">
<div class="passwordku">
<div class="ketpassword">
Masukkan Password Untuk Mengakses Halaman ini!
</div>
<input class="inputpassw" type="text" id="password" onkeydown="if (event.keyCode == 13) verify()" />
<br/>
<input class="buttonkls" id="button" type="button" value="Buka Halaman" onclick="verify()" />
</div>
</div>
</center>
<div id="HIDDENDIV" class="hidden">
Konten yang akan di proteksi.
</div>