<!-- Sweetalert2 -->
<script src="sweetalert2.all.min.js"></script>
<script>
function myLogin(){
Swal.fire({
title: "Password required",
text: "Please input correct password:",
input: 'text',
showCancelButton: true
}).then((result) => {
if (result.value!='123') {
Swal.fire({
title: 'Wrong password..',
text: "Use another passw is not : "+result.value,
type: 'success',
}).then(function (result) {
if (true) {
location.reload();
}
})
}else{
return true
}
});
}
window.onload = myLogin; // use or not-use
</script>
<!-- ORIGINAL Style -->
<script>
function myLogin(){
var password = prompt("Please enter your password", "");
if (password == '2114') {
return true
}else{
alert('Wrong password !')
location.href = "mbook_generator.php"
return false
}
}
window.onload = myLogin;
</script>
ไม่มีความคิดเห็น:
แสดงความคิดเห็น