-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
138 lines (125 loc) · 4.9 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<script src="qrcode.js"></script>
<script src="index.js"></script>
</head>
<body>
<div class="main">
<div id="resp">
<button class="tablink" onclick="openPage('URL', this, '#ebebeb')" id="defaultOpen">URL</button>
<button class="tablink" onclick="openPage('Text', this, '#ebebeb')">Text</button>
<button class="tablink" onclick="openPage('Contact', this, '#ebebeb')">Contact</button>
<button class="tablink" onclick="openPage('Wifi', this, '#ebebeb')">Wifi</button>
<button class="tablink" onclick="openPage('SMS', this, '#ebebeb')">SMS</button>
</div>
<div id="URL" class="tabcontent">
<!-- Begin: Form for URL -->
<form id="myForm">
<p id="error"> </p>
<span>Enter a url</span>
<input id="inputText" type="url" />
<button type="button" onclick="QRurl()">Make QR CODE</button>
<div id="urlqr"> </div>
</form>
<!-- End: Form for URL -->
</div>
<div id="Text" class="tabcontent">
<!-- Begin: Form for Text -->
<form id="texForm">
<p id="error2"> </p>
<span>Enter a Text</span>
<input id="inputText2" type="text" />
<button type="button" onclick="QRtext()">Make QR CODE</button>
<div id="teqr"> </div>
</form>
<!-- End: Form for Text -->
</div>
<div id="Contact" class="tabcontent">
<!-- Begin: Form for VCFORM or Contact -->
<form id="VCForm">
<span>Full Name</span>
<input id="name" type="text" />
<br>
<span>Title</span>
<input id="title" type="text" />
<br>
<span>Company</span>
<input id="company" type="text" />
<br>
<span>Phone</span>
<input type="text" id="phone">
<br>
<span>URL</span>
<input id="url" type="text" />
<br>
<span>Address</span>
<input id="address" type="text" />
<br>
<span>Email</span>
<input id="email" type="text" />
<br>
<button type="button" onclick="VcardQR()">Make QR CODE</button>
<div id="vcqr"> </div>
</form>
<!-- End: Form for VCFORM or Contact -->
</div>
<div id="Wifi" class="tabcontent">
<!-- Begin: Form for Wifi -->
<form id="WifiForm">
<p id="ssid-error"> </p>
<span>SSID</span>
<input id="SSID" type="text" />
<br>
<span>Password</span>
<input id="Password" type="text" />
<br>
<span>Encryption</span>
<select id="enc">
<option>WPA</option>
<option>WEP</option>
</select><br>
<span>Hidden</span>
<input type="checkbox" id="hidden">
<button type="button" onclick="WifiQR()">Make QR CODE</button>
<div id="qrwifi"> </div>
</form>
<!-- End: Form for Wifi -->
</div>
<div id="SMS" class="tabcontent">
<!-- Begin: Form for SMS -->
<form id="SMSForm">
<p id="error"> </p>
<span>Enter Phone Number</span>
<input id="phnumber" type="text" /><br>
<span>Enter SMS</span>
<input id="sms" type="text" />
<br>
<button type="button" onclick="smsQR()">Make QR CODE</button>
<br>
<div id="smsrs"> </div>
</form>
<!-- End: Form for SMS -->
</div>
<script>
function openPage(pageName, elmnt, color) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablink");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].style.backgroundColor = "";
}
document.getElementById(pageName).style.display = "block";
elmnt.style.backgroundColor = color;
}
// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();
</script>
</div>
</body>
</html>