Kumi
a2335a7082
Introduced QRMaker, a simple web app for generating QR codes from user input. Key features include real-time QR code generation, multi-line input, and responsive design using Bootstrap. Added initial project setup with HTML, CSS, JS, and a README for setup and usage instructions.
22 lines
No EOL
545 B
JavaScript
22 lines
No EOL
545 B
JavaScript
document.addEventListener('DOMContentLoaded', function () {
|
|
const textInput = document.getElementById('text-input');
|
|
const qrCodeContainer = document.getElementById('qrcode');
|
|
|
|
const qrCode = new QRCode(qrCodeContainer, {
|
|
text: "",
|
|
width: 256,
|
|
height: 256,
|
|
});
|
|
|
|
function updateQRCode() {
|
|
const text = textInput.value;
|
|
qrCode.clear();
|
|
if (text) {
|
|
qrCode.makeCode(text);
|
|
}
|
|
}
|
|
|
|
textInput.addEventListener('input', updateQRCode);
|
|
|
|
updateQRCode();
|
|
}); |