This code is a QR Code Generator with options to download the .png or copy the code to your clipboard. It includes a reset field option below.
<!DOCTYPE html> <html> <head> <title>QR Code Generator</title> <style> body { font-family: Arial, sans-serif; } #qr-container { text-align: center; margin-top: 50px; } #link-input { width: 300px; padding: 10px; } #generate-button, #copy-button, #reset-link { padding: 10px; color: white; border: none; cursor: pointer; text-decoration: none; } #generate-button, #copy-button { background-color: black; margin-right: 10px; } #reset-link { color: red; } </style> </head> <body> <h1>QR Code Generator</h1> <div id="qr-container"> <input type="text" id="link-input" placeholder="Enter link URL"> <button id="generate-button" onclick="generateQR()">Generate QR Code</button> <button id="copy-button" onclick="copyQR()">Copy Image</button> <a id="download-link" style="display: none" download="qrcode.png">Download Image</a> <br> <a id="reset-link" onclick="resetForm()">Reset</a> </div> <script src="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js"></script> <script> // JavaScript functions go here (as in the previous example) </script> </body> </html>
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article