通过链接自动生成二维码

 

引入qrcode.min.js这个文件

<div class="yard" id="qrcode">
<img src="" alt="" style=" width: 200px;height: 200px;background: yellow;">
</div>

 

 

 

<script>
var qrCode = new QRCode(document.getElementById("qrcode"), {
width:200,
height: 200,
});

function makeCode () {
var url = '路径';
qrCode.makeCode( url );
}

makeCode();
</script>

posted on 2017-12-26 19:08  芸芸众生!  阅读(772)  评论(0编辑  收藏  举报