-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (44 loc) · 1.41 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>QR CODE</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, inicial-scale=1, maximum-scale=1, minimum-scale=1">
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="node_modules/jquery-qrcode/dist/jquery-qrcode.min.js"></script>
</head>
<body>
<div id="qrcode"></div>
<!-- exemplo 1 -->
<script>
var atualURL = document.URL;
window.onload = function() {
jQuery('#qrcode').qrcode({
text : atualURL
});
}
</script>
<!-- exemplo 2 -->
<script>
var atualURL = document.URL;
$('#qrcode').qrcode({
width: 120,
height: 120,
text: atualURL
});
</script>
<!-- exemplo 3 -->
<script>
var atualURL = document.URL;
window.addEventListener('load', function(){QRCode('#qrcode', atualURL)}, false);
function QRCode(selector, url) {
$(selector).qrcode({
width: 120,
height: 120,
text: url
});
}
</script>
</body>
</html>