optre
一位前端开发者,keep going!

插件下载地址:

https://static.runoob.com/assets/qrcode/qrcode.min.js

1. 普通用法

<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "http://www.runoob.com"); </script>

2. 自定义样式

<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
});
</script>

 

posted on 2020-05-12 09:09  optre  阅读(1469)  评论(0编辑  收藏  举报