├── README.md ├── styles.css ├── script.js └── index.html /README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: 'Arial', sans-serif; 3 | display: flex; 4 | align-items: center; 5 | justify-content: center; 6 | height: 100vh; 7 | margin: 0; 8 | } 9 | 10 | .container { 11 | text-align: center; 12 | } 13 | 14 | #qrcode { 15 | margin-top: 20px; 16 | } 17 | -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | function generateQRCode() { 2 | // Get the text from the input field 3 | var text = document.getElementById('text-input').value; 4 | 5 | // Get the div where the QR code will be displayed 6 | var qrcodeDiv = document.getElementById('qrcode'); 7 | 8 | // Clear any previous QR code 9 | qrcodeDiv.innerHTML = ''; 10 | 11 | // Create a new QR Code using the qrcode-generator library 12 | var qrcode = new QRCode(qrcodeDiv, { 13 | text: text, 14 | width: 128, 15 | height: 128 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | QR Code Generator 7 | 8 | 9 | 10 |
11 |

QR Code Generator

12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 21 | 22 | --------------------------------------------------------------------------------