<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<script src="vconsole.min.js"></script>
<script src="quagga.js"></script>
</head>
<body>
<div id="canvanCode"></div>
<script>
Quagga.init({
inputStream : {
name : "Live",
type : "LiveStream",
target: document.querySelector('#canvanCode') // Or '#yourElement' (optional)
},
decoder : {
readers : ["ean_reader",'code_39_reader'],
debug: {
drawBoundingBox: false,
showFrequency: false,
drawScanline: false,
showPattern: false
},
quaggaJS 识别条形码
最新推荐文章于 2024-06-12 09:59:01 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)