前端生成二维码
作者:
在下高姓 | 来源:发表于
2020-05-10 16:27 被阅读0次前端生成二维码需要用到插件
最近发现一个插件qart.min.js具体步骤如下
<body>
<div id="qart"></div>//图片容器
<script src="qart.min.js"></script>//需要的插件
<script>
image = new Image();
image.src = './img/QQ截图20200509115104.png';
image.width = 300;
image.height=300;
// document.body.appendChild(image)
image.onload = function(){
new QArt({
value: '',//二维码的内容
imagePath: './img/QQ截图20200509115104.png',//二维码底图
filter: 'threshold',//1.类型color 2.threshold 3.filter
size: 195
}).make(document.getElementById('qart'));//放入相应节点
}
</script>
</body>
本文标题:前端生成二维码
本文链接:https://www.haomeiwen.com/subject/ocvjnhtx.html
网友评论