JavaScript 生成微信二维码
JavaScript About 858 wordsjquery-qrcode
需要依赖jQuery
项目地址
https://github.com/jeromeetienne/jquery-qrcode
使用
<div id="qrcode"></div>
$('#qrcode').qrcode("二维码真实内容");
$('#qrcode').qrcode({width: 64,height: 64,text: "size doesn't matter"});
开源cdn
https://www.bootcdn.cn/jquery.qrcode/ https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js
qrcodejs
无任何依赖,但无开源cdn
项目地址
https://github.com/davidshimjs/qrcodejs
使用
<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "二维码真实内容");
</script>
添加可选项
<div id="qrcode"></div>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: "二维码真实内容",
width: 128,
height: 128,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
</script>
Views: 3,356 · Posted: 2019-05-21
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...