<!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>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"></script>
var qrcode = new QRCode("test", {
text: "http://jindo.dev.naver.com/collie",
width: 128,
height: 128,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "http://jindo.dev.naver.com/collie");
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
const QRCode = require('qrcode');
const path = require('path');
QRCode.toFile(path.join(__dirname, 'qrcode.png'), 'put your data here', (err)=>{
if (err) throw err;
});
Code Example |
---|
Html :: select all text in textarea javascript |
Html :: faq html css |
Html :: index html example |
Html :: import script html |
Html :: ouvrir dans nouvelle page html |
Html :: Vertically align text next to an image? |
Html :: bootstrap loader |
Html :: highlightjs |
Html :: html5 |
Html :: balzor onchange |
Html :: toggle on-click button vue |
Html :: og tags |
Html :: select add placeholder |
Html :: fa icon person |
Html :: html image |
Html :: git pull one file |
Html :: grepper logo |
Html :: how to write 2 class in html |
Html :: bootstrap carousel dark |
Html :: bootstrap 4 search box |
Html :: how to draw a small line in html |
Html :: slick slider pause on video play |
Html :: uncaught error: bootstrap |
Html :: bootstrap form textarea |
Html :: jsp variable in html |
Html :: javascript onblur |
Html :: radio checked on start |
Html :: how to remove line in href tag in html |
Html :: close hamburger menu fontawesome |
Html :: center text in html |