Answers for "qr code using javascript"

0

qr code generator with javascript

<script src="https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"></script>
Posted by: Guest on February-15-2021
0

qr code using javascript

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>JavaScript QR Code Generator</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta https-equiv="X-UA-Compatible" content="ie=edge" />
    <link rel="stylesheet" href="style.css" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"></script>
  </head>
  <body>
    <div class="QRWrapper">
      <div class="QRWrapperInner">
        <div class="QRfield">
          <input id="qr-text" type="text" placeholder="Text to generate QR code"/>
          <button class="qr-btn" onclick="generateQRCode()">Create QR Code</button>
        </div>
        <div class="qr-code-result">
          <p id="qr-result">This is deault QR code:</p>
          <canvas id="qr-code"></canvas>
        </div>
      </div>
    </div>

     <script>
          /* JS comes here */
          var qr;
          (function() {
                        qr = new QRious({
                        element: document.getElementById('qr-code'),
                        size: 200,
                        value: 'https://blog.stackfindover.com/'
                    });
                })();
                
                function generateQRCode() {
                    var qrtext = document.getElementById("qr-text").value;
                    document.getElementById("qr-result").innerHTML = "QR code for " + qrtext +":";
                    //alert(qrtext);
                    qr.set({
                        foreground: '#0f62fe',
                        size: 200,
                        value: qrtext
                    });
                }
        </script>
  </body>
</html>
Posted by: Guest on September-19-2021
-1

qrcode js

var qrcode = new QRCode("test", {
    text: "http://jindo.dev.naver.com/collie",
    width: 128,
    height: 128,
    colorDark : "#000000",
    colorLight : "#ffffff",
    correctLevel : QRCode.CorrectLevel.H
});
Posted by: Guest on May-27-2020
-2

qrcode js

<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "http://jindo.dev.naver.com/collie");
</script>
Posted by: Guest on May-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language