forked from felipenmoura/qr-code-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
27 lines (26 loc) · 796 Bytes
/
index.html
File metadata and controls
27 lines (26 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<script src="scripts/scanner.js"></script>
<script>
function tryIt() {
window.QRScanner.initiate({
match: /^[a-zA-Z0-9]{16,18}$/,
onResult: function (result) {
console.info("DONE: ", result);
},
onError: function (err) {
console.error("ERR :::: ", err);
},
onTimeout: function () {
console.warn("TIMEDOUT");
}
});
}
</script>
</head>
<body>
<input type="button" value="Start it" onclick="tryIt()" />
</body>
</html>