用canvas生成二维码

   $("#actimg").qrcode({
                        render: "canvas",    //设置渲染方式,有table和canvas,使用canvas方式渲染性能相对来说比较好
                        text: "http://dolphinonline.52souhui.com/noAcitivity.html",    //扫描了二维码后的内容显示,在这里也可以直接填一个网址,扫描二维码后
                        "150",               //二维码的宽度
                        correctLevel: 0,
                        height: "150",              //二维码的高度
                        background: "#ffffff",       //二维码的后景色
                        foreground: "#000000",        //二维码的前景色
                        src: 'images/226327331348661712.png'             //二维码中间的图片
                    });

需要引入1、 jquery.qrcode.js

           2、 utf.js

原文地址:https://www.cnblogs.com/myRain/p/6047021.html