<!doctype html>
<html>
<meta charset="utf-8"/>
<head>
<script src="qrcode.js"></script>
</head>
<body>
<div id="qrc"></div>
<script>
var qrcode = new QRCode(document.getElementById('qrc'), {
width: 300,//设置宽高
height: 300
});
qrcode.makeCode('二维码内容');
</script>
</body>
</html>
转载于:https://www.cnblogs.com/zwh-blog/p/5760696.html