Description: -
Effortlessly manage your passwords with SecurePass Manager. Safely store website credentials, including usernames and passwords, in a user-friendly interface. Simply input your details and click "Save" to securely store your passwords. Enjoy a convenient and organized approach to password management.
Build a Password Manager tool with input for website, username, password, and a save button. Use HTML, CSS, and JavaScript.
Project Tool -
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Manager</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
#password-manager {
width: 300px;
padding: 20px;
border: 1px solid #ccc;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 5px;
}
label {
display: block;
margin-bottom: 8px;
}
input {
width: 100%;
padding: 8px;
margin-bottom: 16px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px;
border: none;
border-radius: 3px;
cursor: pointer;
width: 100%;
}
</style>
</head>
<body>
<div id="password-manager">
<h2>Password Manager</h2>
<label for="website">Website:</label>
<input type="text" id="website" placeholder="Enter website" required>
<label for="username">Username:</label>
<input type="text" id="username" placeholder="Enter username" required>
<label for="password">Password:</label>
<input type="password" id="password" placeholder="Enter password" required>
<button onclick="savePassword()">Save</button>
</div>
<script>
function savePassword() {
const websiteInput = document.getElementById('website');
const usernameInput = document.getElementById('username');
const passwordInput = document.getElementById('password');
const website = websiteInput.value;
const username = usernameInput.value;
const password = passwordInput.value;
if (website && username && password) {
// You can replace this part with your logic to save the password
alert(`Password saved for ${website}`);
// Clear input fields after saving
websiteInput.value = '';
usernameInput.value = '';
passwordInput.value = '';
} else {
alert('Please fill in all fields before saving.');
}
}
</script>
</body>
</html>

No comments:
Post a Comment