官网
Github: https://github.com/davidshimjs/qrcodejs
qrcode.js原理是用html5 Canvas画布生成二维码.
使用
<div id="qrcode"></div>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: "http://jindo.dev.naver.com/collie",
width: 128,
height: 128,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
//其他操作
qrcode.clear(); // clear the code.
qrcode.makeCode("http://naver.com"); // make another code.
</script>