<!DOCTYPEhtml><html><head><metacharset="utf-8"><title>jQuery生成QRCode二维码</title></head><body><!--存放二维码--><divid="qrcode-1"></div><!--存放二维码--><divid="qrcode-2"></div><!--引入jQuery文件--><scriptsrc="https://cdn.bootcss.com/jquery/3.0.0/jquery.min.js"></script><!--引入jQuery.qrcode文件--><scriptsrc="https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script><script>//第一种方法$('#qrcode-1').qrcode("Thisisthefirstmethod");//第二种方法$('#qrcode-2').qrcode({width:128,//二维码宽度height:128,//二维码高度text:"Thisisthesecondmethod"//字符串内容});</script></body></html>