一:arale-qrcode
npm i arale-qrcode
<html>
<body>
<div id="share_tools"></div>
<script src="qrcode.min.js"></script>
</body>
<script type="text/javascript"> var codeFigure = new AraleQRCode({
"render": "svg", // 生成的类型 'svg' or 'table' "text":'https://github.com/soldair/node-qrcode', // 需要生成二维码的链接 "size": 120 // 生成二维码大小 }); var share_tools = document.querySelector('#share_tools'); share_tools.appendChild(codeFigure); </script>
</html>
二:QRCode.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div id="qrcode"></div>
<script type="text/javascript" src="qrcode.js"></script>
<script type="text/javascript"> new QRCode(document.getElementById("qrcode"), "https://github.com/davidshimjs/qrcodejs"); var qrcode = new QRCode(document.getElementById("qrcode"), {
text: "生成二维码的方法不止一种", width: 128, height: 128, colorDark : "#f60", colorLight : "#ccc", correctLevel : 0 // 二维码结构复杂性 0~3 }); </script>
</body>
</html>
三:QR码生成器
<img style="width: 300px;height: 300px;" src="https://api.qrserver.com/v1/create-qr-code?data=http://goqr.me/api/" >
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/180630.html原文链接:https://javaforall.cn