-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathqrcode.html
61 lines (40 loc) · 816 Bytes
/
qrcode.html
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<style type="text/css">
* {padding:0; margin:0;}
svg {border:1px #eee solid;}
</style>
<script src="qrcode.min.js"></script>
</head>
<body>
<script>
'use strict';
var
qrcodes = [
/* with all available options: */
new QRCode({
msg : 'https://github.com/datalog/qrcode-svg'
,dim : 256
,pad : 4
,mtx : -1
,ecl : "H"
,ecb : 1
,pal : ["#037", "#f2f4f8"]
,vrb : 0
})
/* message, background is transparent as it was not set: */
,new QRCode({
msg : 'default usage'
,ecl : 'L'
})
/* ...or simple form: */
,new QRCode('Good Luck')
];
for( var c = 0; c < qrcodes.length; c++ ) {
document.body.appendChild( qrcodes[ c ] );
}
</script>
</body>
</html>