“Qrcode JS” Kode Jawaban

Bagaimana cara menghasilkan kode QR di JavaScript?

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Generating QR Code</title>
    <!-- Reference the qrcode library -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
  </head>
  <body>
    <!-- Create a container for the QR code -->
    <div id="qrcode-container"></div>
    <!-- A button that is used to create QR code -->
    <button id="create-qrcode">CREATE QR Code</button>
  </body>
  <script>
    // Create QR code when button is clicked
    document.getElementById("create-qrcode").addEventListener("click", () => {
      // new QRCode(Target container, text to encode)
      var qrc = new QRCode(
        document.getElementById("qrcode-container"),
        "https://www.wissamfawaz.com/index.htm"
      );
    });
  </script>
</html>
Wissam

generator kode qr dengan javascript

<script src="https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"></script>
Wandering Worm

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
});
johannb75

Qrcode JS

<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "http://jindo.dev.naver.com/collie");
</script>
johannb75

Node Qrcode

npm install --save qrcode
Purple Team

Jawaban yang mirip dengan “Qrcode JS”

Pertanyaan yang mirip dengan “Qrcode JS”

Lebih banyak jawaban terkait untuk “Qrcode JS” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya