-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
33 lines (27 loc) · 922 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container"><p>Enter your Text/LINK</p>
<input type="text" placeholder="Text/LINK" id="qrText"></input>
<div id="imgBox">
<img src="" id="qrImage">
</div>
<button onclick="GenerateQr()">Generate QR </button>
</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;
imgBox.classList.add("show-img")
}
</script>
</body>
</html>