123456789101112131415161718192021222324252627 |
- <html>
- <head>
- <title>Html-Qrcode Demo</title>
- <body>
- <div id="qr-reader" style="width:500px;"></div>
-
- </body>
- <script src="./html5-qrcode.min.js"></script>
- <script>
- const html5QrCode = new Html5Qrcode("qr-reader");
- const qrCodeSuccessCallback = (decodedText, decodedResult) => {
-
- alert('decodedText: ' + decodedText);
- };
- const config = { fps: 10, qrbox: 300 };
- html5QrCode.start({ facingMode: "environment" }, config, qrCodeSuccessCallback);
- html5QrcodeScanner.render(onScanSuccess);
- </script>
- </head>
- </html>
|