<div id="qrcode" style="width:200px; height:200px;position: fixed;bottom: 40%; right: 20%;"></div>
<script src="QRCode.js"></script>
var qrcode = new QRCode(document.getElementById("qrcode"), {width : 200,height : 200}); var token="params";var QRCodeUrl="http:\www.baidu.com"+"/Share/ScanQRCode?token="+token;qrcode.makeCode(QRCodeUrl); 以上内容是小编给大家介绍的JavaScript动态生成二维码图片的相关内容,希望对大家有所帮助!