用js生成二维码
<!doctype html> <html> <meta charset="utf-8"/> <head> <script src="qrcode.js"></script> </head> <body> <div id="qrc"></div> <script> var qrcode = new QRCode(document.getElementById('qrc'), { width: 300,//设置宽高 height: 300 }); qrcode.makeCode('二维码内容'); </script> </body> </html>