引入jquery和jquery-qrcode
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/lrsjng.jquery-qrcode/0.17.0/jquery-qrcode.min.js"></script>
简单使用
<!DOCTYPE html>
<html>
<head>
<title>Qrcode</title>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/lrsjng.jquery-qrcode/0.17.0/jquery-qrcode.min.js"></script>
</head>
<body>
<div id="qrcode"></div>
<script>
$(function(){
$('#qrcode').qrcode("this plugin is great");
});
</script>
</body>
</html>
效果:
官网:
https://larsjung.de/jquery-qrcode/
github源码:
这篇博客介绍了如何在项目中引入jQuery和jquery-qrcode库来生成二维码。通过简单几步,即可实现二维码的创建,并提供了官网和GitHub源码链接供深入研究。
378

被折叠的 条评论
为什么被折叠?



