xxxxxxxxxx
<script type="text/javascript">
var password = "please";
var x = prompt("Enter in the password "," ");
if (x.toLowerCase() == password) {
alert("Come right in \n \n You've entered in the right password");
window.location = "good.htm";
}
else {
window.location = "bad.htm";
}
</script>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<title>Show Password Example</title>
<script>
function togglePasswordVisibility() {
var passwordInput = document.getElementById("password");
if (passwordInput.type === "password") {
passwordInput.type = "text";
} else {
passwordInput.type = "password";
}
}
</script>
</head>
<body>
<label for="password">Password:</label>
<input type="password" id="password" name="password">
<br>
<input type="checkbox" onclick="togglePasswordVisibility()"> Show Password
</body>
</html>
xxxxxxxxxx
<script type="text/javascript">
var password = "please";
var x = prompt("Enter in the password "," ");
if (x.toLowerCase() == password) {
alert("Come right in \n \n You've entered in the right password");
window.location = "good.htm";
}
else {
window.location = "bad.htm";
}
</script>