Some thing like this.
<!DOCTYPE html>
<html>
<head>
<title>Password Toggle Example</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 50px;
}
.container {
max-width: 300px;
margin: auto;
}
.toggle-button {
margin-top: 10px;
padding: 5px 10px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<label for="myInput">Password:</label>
<input type="password" id="myInput" value="FakePSW">
<button class="toggle-button" onclick="togglePassword()">Show Password</button>
</div>
<script>
function togglePassword() {
var x = document.getElementById("myInput");
var btn = document.querySelector(".toggle-button");
if (x.type === "password") {
x.type = "text";
btn.textContent = "Hide Password";
} else {
x.type = "password";
btn.textContent = "Show Password";
}
}
</script>
</body>
</html>
I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.
Please, if this post was useful, leave your kudos and mark it as solved.