根据二维码链接生成二维码

template:

<script src="lib/qrcode.min.js?v=0.5"></script>复制代码
<div class="zf-group-h">长按,识别此二维码可微信或支付宝缴费</div>
<div id="qrcode" class="zf-group" style="text-align:center;">复制代码

js:

$("#qrcode").html("");
var qrcode = new QRCode("qrcode", {   
   text: "http://………………………………",   
   width: 200,
   height: 200,
   colorDark: '#000000',
   colorLight: "#ffffff",
   correctLevel: QRCode.CorrectLevel.H
});复制代码

生成效果:


本文中未展示所写的CSS代码。使用的插件是qrcode。

参考地址:github.com/davidshimjs…



转载于:https://juejin.im/post/5cf5e1aef265da1b86087351

猜你喜欢

转载自blog.csdn.net/weixin_34344403/article/details/91463461
今日推荐