QRCanvas 示例使用 - 【笔记】
引入js
<script src="https://cdn.jsdelivr.net/npm/qrcanvas@3"></script>
示例html
<!DOCTYPE html> <html> <head> <title>QRCanvas Demo</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" /> <script src="./qrcanvas.js"></script> </head> <body> <div id="qrcode"></div> </body> <script> const canvas = qrcanvas.qrcanvas({ data: 'hello, world' // 内容 }); document.getElementById('qrcode').appendChild(canvas); </script> </html>