代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <script src="https://files.cnblogs.com/files/wangzhaobo/qrcode.js"></script> <script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.js"></script> <strong>生成二维码</strong> <div id="qrcode"></div> <script> var url = "http://www.cnblogs.com/wangzhaobo/"; //参数1表示图像大小,取值范围1-10;参数2表示质量,取值范围‘L‘,‘M‘,‘Q‘,‘H‘ var qr = qrcode(10, ‘H‘); qr.addData(url); qr.make(); $("#qrcode").html(qr.createImgTag()); </script> </body> </html>
原文地址:https://www.cnblogs.com/wangzhaobo/p/8993235.html
时间: 2024-10-13 16:51:32