引入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>
效果: