<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jQuery生成二维码实例</title> <script src="http://apps.bdimg.com/libs/jquery/1.8.3/jquery.js"></script> <script type="text/javascript" src="http://static.runoob.com/assets/qrcode/qrcode.min.js"></script> </head> <body> <div id="code"></div> <script> function newCode(str){ var qrcode = new QRCode(document.getElementById("code"), { width : 200, height : 200 }); qrcode.makeCode(str); } newCode("https://www.baidu.com"); </script> </body> </html>
来自微信公众号:编程社
程序员日常进阶宝典,欢迎关注!
原文地址:https://www.cnblogs.com/ai10999/p/11449503.html
时间: 2024-10-12 10:28:06