【记录】JS 生成 URL 二维码

示例代码:

 1 <html>
 2 <head>
 3 <title>example</title>
 4 </head>
 5 <body>
 6 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
 7 
 8 <script type="text/javascript" src="http://jeromeetienne.github.io/jquery-qrcode/src/jquery.qrcode.js"></script>
 9 <script type="text/javascript" src="http://jeromeetienne.github.io/jquery-qrcode/src/qrcode.js"></script>
10 
11 <p>Render in table</p>
12 <div id="qrcodeTable"></div>
13 <p>Render in canvas</p> 
14 <div id="qrcodeCanvas"></div>
15 <script>
16     jQuery('#qrcodeTable').qrcode({
17         render : "table",
18         text : "http://jetienne.com"
19     });    
20     jQuery('#qrcodeCanvas').qrcode({
21         text : "http://jetienne.com"
22     });    
23 </script>
24 
25 </body>
26 </html>

生成结果:

原文地址:https://www.cnblogs.com/xishuai/p/js-jquery-qrcode-url.html