版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xubuhang/article/details/78573393
官网地址
https://larsjung.de/jquery-qrcode/
jquery-qrcode需要jquery的支持。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>二维码生成</title>
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/jquery-qrcode-0.14.0.min.js"></script>
</head>
<body>
<div id="qrcodeCanvas" ></div>
<script>
jQuery('#qrcodeCanvas').qrcode({
width : 300,
height : 300,
text : "I am bilibili ,干杯。1234abcd!@#$%^&*()"
});
</script>
</body>
</html>