Created
October 27, 2022 07:32
-
-
Save hoyangtsai/53cb4aa634fcf6c72275bd0d308b6881 to your computer and use it in GitHub Desktop.
generate qrcode from url
This file contains 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
<html> | |
<body> | |
<div id="qrcode"></div> | |
<script src="https://cdn.jsdelivr.net/gh/davidshimjs/qrcodejs/qrcode.min.js"></script> | |
<script> | |
const qrcode = new QRCode(document.getElementById('qrcode'), { | |
text: 'http://jindo.dev.naver.com/collie', | |
width: 128, | |
height: 128, | |
colorDark : '#000', | |
colorLight : '#fff', | |
correctLevel : QRCode.CorrectLevel.H | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ref: https://stackoverflow.com/questions/67403923/how-do-i-generate-qr-code-from-url-in-javascript