-
Notifications
You must be signed in to change notification settings - Fork 0
/
playground.html
208 lines (204 loc) · 6.09 KB
/
playground.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Masked Input Fields</title>
</head>
<body>
<div>
<label>Brazil CPF: </label>
<input type="text" data-mask="cpf">
</div>
<div>
<label>Brazil CPF Pre-filled: </label>
<input type="text" data-mask="cpf" value="91827364564">
</div>
<hr>
<div>
<label>Brazil CNPJ: </label>
<input type="text" data-mask="cnpj">
</div>
<div>
<label>Brazil CNPJ Pre-filled: </label>
<input type="text" data-mask="cnpj" value="00000000074128">
</div>
<hr>
<div>
<label>Brazil CNPJ Alphanumeric: </label>
<input type="text" data-mask="cnpj_alpha">
</div>
<div>
<label>Brazil CNPJ Alphanumeric Pre-filled: </label>
<input type="text" data-mask="cnpj_alpha" value="00AB1CD20EF128">
</div>
<hr>
<div>
<label>Brazil CPF/CNPJ: </label>
<input type="text" data-mask="cpf_cnpj">
</div>
<div>
<label>Brazil CPF/CNPJ Pre-filled with CPF: </label>
<input type="text" data-mask="cpf_cnpj" value="91827364564">
</div>
<div>
<label>Brazil CPF/CNPJ Pre-filled with CNPJ: </label>
<input type="text" data-mask="cpf_cnpj" value="00000000074128">
</div>
<hr>
<div>
<label>Brazil CPF/CNPJ Alphanumeric: </label>
<input type="text" data-mask="cpf_cnpj_alpha">
</div>
<div>
<label>Brazil CPF/CNPJ Alphanumeric Pre-filled with CPF: </label>
<input type="text" data-mask="cpf_cnpj_alpha" value="91827364564">
</div>
<div>
<label>Brazil CPF/CNPJ Alphanumeric Pre-filled with CNPJ: </label>
<input type="text" data-mask="cpf_cnpj_alpha" value="00AB1CD20EF128">
</div>
<hr>
<div>
<label>Brazil CEP: </label>
<input type="text" data-mask="cep">
</div>
<div>
<label>Brazil CEP Pre-filled: </label>
<input type="text" data-mask="cep" value="25965360">
</div>
<hr>
<div>
<label>Phone: </label>
<input type="text" data-mask="phone">
</div>
<div>
<label>Brazil Phone Pre-filled: </label>
<input type="text" data-mask="phone" value="2123456789">
</div>
<div>
<label>Brazil Cellphone Pre-filled: </label>
<input type="text" data-mask="phone" value="21987654321">
</div>
<hr>
<div>
<label>Date: </label>
<input type="text" data-mask="date">
</div>
<div>
<label>Date Pre-filled: </label>
<input type="text" data-mask="date" value="06/08/1976">
</div>
<hr>
<div>
<label>Date / Time: </label>
<input type="text" data-mask="datetime">
</div>
<div>
<label>Date / Time Pre-filled: </label>
<input type="text" data-mask="datetime" value="06/08/1976 20:40">
</div>
<hr>
<div>
<label>Time: </label>
<input type="text" data-mask="time">
</div>
<div>
<label>Time Pre-filled: </label>
<input type="text" data-mask="time" value="20:40">
</div>
<hr>
<div>
<label>Monetary US (default): </label>
<input type="text" data-mask="money">
</div>
<div>
<label>Monetary US Pre-filled: </label>
<input type="text" data-mask="money" value="987654123456.78">
</div>
<div>
<label>Monetary US Pre-filled: </label>
<input type="text" data-mask="money" value="87654123456.7">
</div>
<div>
<label>Monetary US Pre-filled: </label>
<input type="text" data-mask="money" value="87654123456">
</div>
<hr>
<div>
<label>Monetary Brazil: </label>
<input type="text" data-mask="money" data-culture="pt-br">
</div>
<div>
<label>Monetary Brazil Pre-filled: </label>
<input type="text" data-mask="money" data-culture="pt-br" value="987654123456.78">
</div>
<div>
<label>Monetary Brazil Pre-filled: </label>
<input type="text" data-mask="money" data-culture="pt-br" value="87654123456.7">
</div>
<div>
<label>Monetary Brazil Pre-filled: </label>
<input type="text" data-mask="money" data-culture="pt-br" value="87654123456">
</div>
<hr>
<div>
<label>Credit Card: </label>
<input type="text" data-mask="ccard">
</div>
<div>
<label>Credit Card Pre-filled: </label>
<input type="text" data-mask="ccard" value="4123456789012345">
</div>
<div>
<label>Credit Card Pre-filled (AMEX): </label>
<input type="text" data-mask="ccard" value="341234567890123">
</div>
<div>
<label>Credit Card Pre-filled (Diners): </label>
<input type="text" data-mask="ccard" value="36123456789012">
</div>
<hr>
<div>
<label>Only Numbers: </label>
<input type="text" data-mask="number" value="">
</div>
<div>
<label>Only Numbers Pre-filled: </label>
<input type="text" data-mask="number" value="12345">
</div>
<div>
<label>Only Numbers Pre-filled with letters: </label>
<input type="text" data-mask="number" value="a1b2c3d4e5">
</div>
<hr>
<div>
<label>Percent: </label>
<input type="text" data-mask="percent" data-culture="pt-br">
</div>
<div>
<label>Percent Pre-filled: </label>
<input type="text" data-mask="percent" data-culture="pt-br" value="92.5">
</div>
<div>
<label>Percent Pre-filled: </label>
<input type="text" data-mask="percent" data-culture="pt-br" value="1.25">
</div>
<div>
<label>Percent Pre-filled: </label>
<input type="text" data-mask="percent" data-culture="pt-br" value="25.82">
</div>
<hr>
<div>
<label>Without mask: </label>
<input type="text">
</div>
<script src="masker.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
Masker.init();
});
</script>
</body>
</html>