admin管理员组文章数量:1415119
I tried to implement a QRCode in my HTML-Template:
<div id="qrcode">
<script type="text/javascript">
new QRCode(document.getElementById('qrcode'), '');
</script>
</div>
In my qrcode.min.js I have this:
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: "",
width: 128,
height: 128,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
But I still get this error and the QRCode don't show off..
Here is my path:
<script "type=text/javascript" src="qrcode.min.js"></script>
Solved
I solved the issue.
The problem was that I integrated :
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: "",
width: 128,
height: 128,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
But I never integrated the function "QRCode". .min.js
There is a really good documentation about the implementation of QRCodes. I needed this function in my qrcode.min.js and now it is working.
本文标签: javascriptUncaught ReferenceError QRCode is not definedStack Overflow
版权声明:本文标题:javascript - Uncaught ReferenceError: QRCode is not defined - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745204165a2647549.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论