-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (37 loc) · 948 Bytes
/
Copy pathindex.html
File metadata and controls
38 lines (37 loc) · 948 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
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html>
<head>
<meta name="viewpoint" content="width=device-width, initial-scale=1.0">
<title>QR Code Generator</title>
<link rel="stylesheet" href="qrcode.css">
</head>
<body>
<div class="container">
<header>
<h1>QRCode Generator</h1>
<center>
<p>Enter text or URL to create QR Code</p>
</center>
</header>
<div class="form">
<center>
<input type="text" id= "qrText" onfocus=this.value='' >
<br>
<div id= "imgBox">
<img src="" id= "qrImage">
</div>
<button onclick="generateQR()" class="btn"><b>Generate QR Code</b></button>
</center>
</div>
</div>
<script>
let imgbox = document.getElementById("imgBox");
let qrImage = document.getElementById("qrImage");
let qrText = document.getElementById("qrText");
function generateQR()
{
qrImage.src = "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" + qrText.value;
}
</script>
</body>
</html>