Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

How to generate a QR code in 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>
Comment

qr code generator with javascript

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

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

qrcode js

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

qr code generator with js

<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript plugin bootstrap 
Javascript :: jquery to vanilla js converter 
Javascript :: how to find dublicates in string 
Javascript :: concat two arrays in react 
Javascript :: validate url javascript 
Javascript :: react native run on a particular emu 
Javascript :: js update all links 
Javascript :: form to object function 
Javascript :: press enter reaction js 
Javascript :: add 5:30 time javascript 
Javascript :: json report plugin 
Javascript :: sinon chaining method 
Javascript :: hidden vue js 
Javascript :: display prety html json data 
Javascript :: open menu 
Javascript :: discord.js slash commend 
Javascript :: get nested value on object react using dot 
Javascript :: corousal in react 
Javascript :: discord.js mention 
Javascript :: mapbox gl js openpopup on a marker 
Javascript :: useSate object 
Javascript :: deez 
Javascript :: Unable to load schema from https json SchemaStore org eslintrc 
Javascript :: -1 in javascript 
Javascript :: why browser is not detecting my current position 
Javascript :: handle fetch error 
Javascript :: does pycharm community edition support javascript 
Javascript :: mozilla observer onclick 
Javascript :: react how to sleep 1 second 
Javascript :: uppy count files from javascript 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =