Upload New File
This commit is contained in:
parent
e08cdf1636
commit
46fd05acbf
|
@ -0,0 +1,30 @@
|
||||||
|
<script src="html5-qrcode.min.js"></script>
|
||||||
|
<style>
|
||||||
|
.result{
|
||||||
|
background-color: green;
|
||||||
|
color:#fff;
|
||||||
|
padding:20px;
|
||||||
|
}
|
||||||
|
.row{
|
||||||
|
display:flex;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div style="width:500px;" id="reader"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<a href="https://reeteshghimire.com.np/2021/05/27/access-camera-and-read-qr-code-using-javascript/">Uses This Code</a>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function onScanSuccess(qrCodeMessage) {
|
||||||
|
window.location.href=qrCodeMessage;
|
||||||
|
}
|
||||||
|
function onScanError(errorMessage) {
|
||||||
|
//handle scan error
|
||||||
|
}
|
||||||
|
var html5QrcodeScanner = new Html5QrcodeScanner(
|
||||||
|
"reader", { fps: 10, qrbox: 250 });
|
||||||
|
html5QrcodeScanner.render(onScanSuccess, onScanError);
|
||||||
|
</script>
|
Loading…
Reference in New Issue