Created
December 8, 2023 11:47
-
-
Save sangwin/c67086a92324b174b15f642e4bdd828e to your computer and use it in GitHub Desktop.
Sangwin| Creating QR Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sangwin| Creating QR Code</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script> | |
</head> | |
<body> | |
<h1>Creating QR Code </h1> | |
<br/> | |
<h2>Simple </h2> | |
<div id="QRCode1"></div> | |
<script type="text/javascript"> | |
new QRCode(document.getElementById("QRCode1"), "https://sangw.in"); | |
</script> | |
<br/><br/><br/> | |
<h2>With Customizations </h2> | |
<div id="QRCode2"></div> | |
<script type="text/javascript"> | |
var options = { | |
text: "https://sangw.in", | |
width: 128, | |
height: 128, | |
colorDark : "#FF0000", | |
colorLight : "#FFFFFF", | |
correctLevel : QRCode.CorrectLevel.H | |
}; | |
var qrcode = new QRCode(document.getElementById("QRCode2"), options); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment