diff --git a/RANDOM PASSWORD GENERATOR/index.html b/RANDOM PASSWORD GENERATOR/index.html new file mode 100644 index 0000000..7f57d5a --- /dev/null +++ b/RANDOM PASSWORD GENERATOR/index.html @@ -0,0 +1,19 @@ + + + + + + Random Password Generator + + + +
+

Random Password Generator

+ + +
+ +
+ + + diff --git a/RANDOM PASSWORD GENERATOR/readme.md b/RANDOM PASSWORD GENERATOR/readme.md new file mode 100644 index 0000000..963dc9a --- /dev/null +++ b/RANDOM PASSWORD GENERATOR/readme.md @@ -0,0 +1,27 @@ +# Random Password Generator + +This is a simple web application that generates random passwords. + +## How to Use + +1. Clone this repository to your local machine. +2. Open the `index.html` file in your web browser. +3. Enter the desired length of the password in the input field. +4. Click the "Generate Password" button to generate a random password. +5. Copy the generated password for your use. + +## Technologies Used + +- HTML +- CSS +- JavaScript + +## Screenshots + +![Password Generator Screenshot](screenshot.png) + +## Credits + +- Created by [Abhishek Kumar] + + diff --git a/RANDOM PASSWORD GENERATOR/screenshot.png b/RANDOM PASSWORD GENERATOR/screenshot.png new file mode 100644 index 0000000..4d6d16b Binary files /dev/null and b/RANDOM PASSWORD GENERATOR/screenshot.png differ diff --git a/RANDOM PASSWORD GENERATOR/script.js b/RANDOM PASSWORD GENERATOR/script.js new file mode 100644 index 0000000..529b193 --- /dev/null +++ b/RANDOM PASSWORD GENERATOR/script.js @@ -0,0 +1,15 @@ + +function generatePassword() { + const length = parseInt(document.getElementById("passwordLength").value); + const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-="; // Character set for the password + let password = ""; + + for (let i = 0; i < length; i++) { + const randomIndex = Math.floor(Math.random() * charset.length); + password += charset.charAt(randomIndex); + } + + // Display the generated password + const passwordDisplay = document.getElementById("passwordDisplay"); + passwordDisplay.textContent = password; +} diff --git a/RANDOM PASSWORD GENERATOR/style.css b/RANDOM PASSWORD GENERATOR/style.css new file mode 100644 index 0000000..67e2cad --- /dev/null +++ b/RANDOM PASSWORD GENERATOR/style.css @@ -0,0 +1,58 @@ +body { + font-family: Arial, sans-serif; + background-color: #f0f0f0; + margin: 0; + padding: 0; +} + +.container { + text-align: center; + margin-top: 50px; +} + +h1 { + color: #333; +} + +input[type="number"] { + padding: 10px; + font-size: 16px; + border: 2px solid hsl(0, 100%, 50%); + border-radius: 5px; + width: 80px; + margin-top: 20px; + transition: border-color 0.3s ease; +} + +input[type="number"]:focus { + outline: none; + border-color: hsl(0, 100%, 40%); +} + + +.password-display { + margin-top: 20px; + font-size: 24px; + background-color: #fff; + padding: 10px 20px; + border: 2px solid hsl(0, 100%, 50%); + border-radius: 5px; + width: 300px; + margin: 20px auto; +} + +button { + padding: 10px 20px; + background-color: hsl(0, 100%, 50%); + color: #fff; + border: none; + border-radius: 5px; + font-size: 16px; + cursor: pointer; + transition: background-color 0.3s ease; + margin-top: 20px; +} + +button:hover { + background-color: hsl(0, 100%, 40%); +}