QR Code Generator

body { font-family: Arial, sans-serif; background-color: #f4f4f4; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; min-height: 100vh; } .container { background-color: #fff; border-radius: 5px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); padding: 20px; text-align: center; } button { background-color: #007bff; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; } const generateButton = document.getElementById("generate"); const qrCodeContainer = document.getElementById("qrcode"); generateButton.addEventListener("click", () => { const content = document.getElementById("content").value; const qrCode = new QRCode(qrCodeContainer, { text: content, width: 128, height: 128, }); });